setup went well, but cant run as nomal user..
Hi,
André here.
Setup went well, but cant run as nomal user. i'v installed davfs2 setup username and pass in ./davfs2/secrets setup correct path to box folder in etc/fstab
NOTE: www.box.net should be www.box.com
try to start box sync... ~/BOX-SYNC/bin$ ./box-sync start /sbin/mount.davfs: program is not setuid root. Failed to mount sync dir.
as root maybe.. ~/BOX-SYNC/bin$ gksu ./box-sync start mount: can't find /root/Box in /etc/fstab or /etc/mtab. Failed to mount sync dir.
so what should i do?
Sorry, found the Debian forum post faster than this one. Can't debug it right now, you did well posting to Debian too. Hope I can debug this tomorrow night.
not sure how Gentoo runs WebDAV maybe on Gentoo a normal user is allowed to run this. on Debian only root is allowd to run WebDAV unless you add normal users to sudoers ( etc\sudoers )
so i'm not sure on how to implement this in to the code....
but i'll keep testing...
run as normal user:
- box-sync still requires " /root/Box/ to be available within /etc/fstab
If /home/NormalUser/Box/ is available within /etc/fstab i should be able to run as normal user.
- box-sync should look at ./davfs2/secrets for username & password to be able run box-sync at boot or crontab
In /etc/fstab I have https://www.box.com/dav /home/me/Box davfs rw,user,noauto 0 0. Also a ~/.davfs2/secrets file exist with my Box credentials.
I saw a suggestion to run sudo dpkg-reconfigure davfs2 and answering "yes" to the setuid question. After that check you belong to the davfs2 group: groups | grep davfs2
when i try to start box-sync
wrong permissions set for cache directory /home/verwijs/.davfs2/cache/www.box.com-dav+home-verwijs-Box+verwijs
witch permisson(s) need this to be? the number, like 600 or 775 etc.
Andre
Should be 0700. And that directory is not created by box-sync. I'm adding a new entry in box-sync to create that directory with the right permissions.
ok :) thanks. this folder is created by davfs ? i didden't make it.
it works..!! :) maybe add entry to change permission with all required files/folders. Stopping box-sync still requires root.
Have you tried the dpkg-reconfigure davfs2 command?
yes i did... starting works great. stopping not for some reason...
I'll have access to a Ubuntu machine tomorrow. I will be able to test it there. In Gentoo stopping works fine.
I will also add some tests, tag box-sync 0.1.0 and upload it to PyPI. Hope to close this issue as soon as possible.
ok :) if i need to tes, let me know..
OK, thanks for all the support @Dutchglory
Instead of https://www.box.com/dav in my /etc/fstab, I used https://dav.box.com/dav and it now works! (syncing as of this moment)
How do i start this at boot and stop on shutdown?
How do i start this at boot and stop on shutdown?
Depends on the Linux distro you are using. Some distros provide a /etc/rc.local where you put the the scripts you want to be run at boot. In Gentoo you would create a /etc/local.d/boxsync.start and add the following statements:
#!/bin/sh
/path/to/bin/box-sync start
and make it chmox +x /etc/local.d/boxsync.start.
To stop the service replicate these steps for /etc/local.d/boxsync.stop.
I'm having a somewhat similar issue. I cannot run ./box-sync start as an unprivileged user, but it's because davfs2 does not recognize my user as belonging to the davfs2 group even though I responded "yes" after running sudo dpkg-reconfigure davfs2.
The other odd thing is that when I run groups jake it shows that I am a member of the davfs2 group. Any idea why box-sync isn't recognizing that my user belongs to the davfs2 group?
Thanks
Hi @gr1zzly-be4r, can you tell me what distro are you using?
Ubuntu GNOME 15.04
I am using Debian 7.2 x86_64
Is the box directory supposed to be it's own file system? Why should the box sync directory be mounted in /etc/fstab?
walter@fir:~/box-linux-sync/bin$ ./box-sync start mount: can't find /home/walter/Box in /etc/fstab or /etc/mtab Failed to mount sync dir.
Hi @walterbyrd
Is the box directory supposed to be it's own file system?
No. You can use your current filesystem (rootfs or /home or anything else).
Why should the box sync directory be mounted in /etc/fstab?
To make the remote WebDAV share locally available. In order to do so we create a directory as a mount point and add it to /etc/fstab to have it automatically mounted.