0

I have Owncloud on my server running, and it saves uploaded files unter /home/uid/files. But Apache is running as a non-root user, and it can't access(write) the files under /home/uid/files.

What is the best way to grant Owncloud access to a subdirectory of an userhome with 700 permissions? And how to implement it?

  • ACL?
  • Any NFS hack?
  • Loopback mount hack?
  • Anything else?

Thanks - Boris

2 Answers 2

0

try: chmod(1), chown(1) or setfacl(1). With these you can specify to be able to write into that directory

example

chgrp -R owncloud /home/*/files
chmod -R g+w /home/*/files
6
  • Ou, I wrote < UID >, and it replaced this, it should be:
    – djboris
    Aug 27, 2012 at 20:01
  • And what when new users are created? I think, then I shoud modify /etc/skel... This can be a good resolution
    – djboris
    Aug 27, 2012 at 20:04
  • try umask and/or set right permission on your /home and it will take care of that going forward.
    – alexus
    Aug 27, 2012 at 20:06
  • But it doesn't work, if /home/uid has 700 permissions - hierarchy... Then, I should change this to 701
    – djboris
    Aug 27, 2012 at 20:08
  • umask should do a job, but is there a reason you having it 700? 701 seems to be easy way to go as well
    – alexus
    Aug 27, 2012 at 20:09
0

ACL's are a great solution here. The two key benefits they will provide you with are being able to assign multiple permissions for multiple groups and users, and the ability to have permissions inherit from parent folders as files are created.

The process is different depending on which filesystem you're using, but enabling is typically just a matter of setting a flag in fstab and remounting the parition. http://nxlinuxadmin.blogspot.com/2010/05/how-to-set-acl-in-linux.html#.UDvVRvvYFyY Once you've enabled them, they are relatively easy to setup using setcfacl and getfacl

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .