Created a non-root account so the user can login and upload files to the public directory (which works) except there's difficulty when adding a CMS.. constant write permissions (when maintaining the site via the CMS).

Ie. The logs experience write permissions.

  • Default is set to rwxr-sr-x (2755) [group = apache] [owner = user]
  • add user to group Apache - still has issues.

is there a way I can alter the permissions so when they further change things and add new files, they don't encounter these issues?

For the time being, I hand modified the affected files to 0775 and seems to work. Ideally, I'd like to set the default permissions so they won't need the folders manually changed.

  • I still prefer ACLs for this. – Michael Hampton Feb 22 '17 at 2:38
  • I set an ACL initially, but I must've not gotten it spot on to account for CMS. Going to try what you linked, thanks! (side note, from the thread: "Note that if some directories need to be writable by the web server, you can set those up on a case by case basis" - this is what I'm aiming to avoid; the 'case by case basis'.. if there's any way around that, please let me know! – necrodeus Feb 22 '17 at 3:03
  • You could make everything writable, but that's a potential security problem. At that point you could just chmod 777 everything, delete everyone's passwords, and roll out the red carpet for the hackers. What really needs to be writable really is a case by case thing. It depends on what your web application does. – Michael Hampton Feb 22 '17 at 3:08
  • Cache, logs, etc. What I mean by avoidance of the 'case by case' is - what do small shared hosts do? Surely those with thousands of customers aren't manually changing permission on individual folders. (And no, definitely do not want to do any 777 stuff.) – necrodeus Feb 22 '17 at 3:12
  • They make everything writable per-user. So they have to do a lot more work to get anywhere near "secure"... – Michael Hampton Feb 22 '17 at 3:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.