Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setup went well, but cant run as nomal user.. #2

Open
Dutchglory opened this issue Jul 15, 2012 · 21 comments
Open

setup went well, but cant run as nomal user.. #2

Dutchglory opened this issue Jul 15, 2012 · 21 comments
Assignees
Milestone

Comments

@Dutchglory
Copy link

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?

@vitorbrandao
Copy link
Member

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.

@Dutchglory
Copy link
Author

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....

@Dutchglory
Copy link
Author

but i'll keep testing...

@Dutchglory
Copy link
Author

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

@vitorbrandao
Copy link
Member

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

@Dutchglory
Copy link
Author

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

@vitorbrandao
Copy link
Member

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.

@ghost ghost assigned vitorbrandao Jul 21, 2012
@Dutchglory
Copy link
Author

ok :) thanks. this folder is created by davfs ? i didden't make it.

@Dutchglory
Copy link
Author

it works..!! :) maybe add entry to change permission with all required files/folders. Stopping box-sync still requires root.

@vitorbrandao
Copy link
Member

Have you tried the dpkg-reconfigure davfs2 command?

@Dutchglory
Copy link
Author

yes i did... starting works great. stopping not for some reason...

@vitorbrandao
Copy link
Member

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.

@Dutchglory
Copy link
Author

ok :) if i need to tes, let me know..

@vitorbrandao
Copy link
Member

OK, thanks for all the support @Dutchglory

@ghost
Copy link

ghost commented Jan 29, 2014

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?

@vitorbrandao
Copy link
Member

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.

@jakebruemmer
Copy link

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

@vitorbrandao
Copy link
Member

Hi @gr1zzly-be4r, can you tell me what distro are you using?

@jakebruemmer
Copy link

Ubuntu GNOME 15.04

@wallyreport
Copy link

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.

@vitorbrandao
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants