맛집 여행 캠핑 일상 생활

리눅스에 box.com webdav 마운트 시키기 본문

LAMP

리눅스에 box.com webdav 마운트 시키기

영은파더♥ 2016. 4. 1. 15:03

리눅스에 box.com webdav 마운트 시키기


리눅스에서도 box.com 의 webdav 를 연결시켜서 하드 확장을 할 수가 있다.

가상서버호스팅 처럼 하드용량이 부족한 경우에 아주 유용하게 공간을 늘일 수 있다.


▶ davfs2 설치 (CentOS 기준)

# yum install -y davfs2



▶ /etc/fstab 에 아래 내용 추가

https://dav.box.com/dav /mnt/box                davfs   rw,user,noauto  0 0



▶ mount 될 디렉토리 생성

# mkdir /mnt/box

# chmod 700 /mnt/box

/mnt/box 디렉토리는 미리 만들어주어야 된다. (mkdir -m700 /mnt/box 미리 퍼미션을 지정하고 생성도 된다.)



▶ /etc/davfs2/secrets 파일에 box.com 계정 정보 저장 (저장을 해놓아야 자동으로 로그인이 된다.)

https://dav.box.com/dav    박스이메일계정      비밀번호



▶ 마운트 하기

# mount /mnt/box

"mount -t davfs dav.box.com/dav /mnt/box" 명령어로도 마운트가 가능하다.



▶ 마운트가 되었는지 확인

# df -h

Filesystem               Size  Used Avail Use% Mounted on

https://dav.box.com/dav   15G  324K   15G   1% /mnt/box

위와 같이 /mnt/box 폴더가 보이는 지 확인하면 된다.

아니면 직접 "ls -l /mnt/box" 로 확인해봐도 된다.



▶ 언마운트 하기

# umount /mnt/box


위 방식은 root 계정 기준이며, 서버가 재시작 되어도 /etc/fstab에 추가한 내용이 있기 때문에 자동으로 마운트가 된다.





구글 드라이브는 예전에는 되더니 지금은 막힌거 같다.


[root@conoha mnt]# mount -t davfs dav-pocket.appspot.com/docso /mnt/gdrive

Please enter the username to authenticate with server

dav-pocket.appspot.com/docso or hit enter for none.

  Username: 유저아이디

Please enter the password to authenticate user 유저아이디 with server

dav-pocket.appspot.com/docso or hit enter for none.

  Password:

/sbin/mount.davfs: warning: the server does not support locks

/sbin/mount.davfs: Mounting failed.

500 Internal Server Error





드롭박스도 예전에는 되더니 지금은 막힌거 같다.


[root@conoha mnt]# mount -t davfs https://dav.dropdav.com /mnt/hit

Please enter the username to authenticate with server

https://dav.dropdav.com or hit enter for none.

  Username: 유저아이디

Please enter the password to authenticate user 유저아이디 with server

https://dav.dropdav.com or hit enter for none.

  Password:

/sbin/mount.davfs: Mounting failed.

Could not authenticate to server: rejected Basic challenge


box.com 은 되기는 되지만 무료 사용시 파일 최대 크기가 100MB 제한이 걸려 있어서 좀 그렇다.





Trackback : | Comments :