Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

share|improve this question

2 Answers 2

up vote 0 down vote accepted

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


chgrp -R owncloud /home/*/files
chmod -R g+w /home/*/files
share|improve this answer
Ou, I wrote < UID >, and it replaced this, it should be: – djboris Aug 27 '12 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 '12 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 '12 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 '12 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 '12 at 20:09

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. Once you've enabled them, they are relatively easy to setup using setcfacl and getfacl

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.