Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

(server) Folder permissions woes

  • 02-05-2010 04:37PM
    #1
    Closed Accounts Posts: 4,763 ✭✭✭


    I've been banging my head off the wall with this problem for sometime. I have a shell account on Digiweb's Linux hosting that I use to manage my websites. Content management systems (Pixelpost 1.7.3 and Wordpress 2.9.2) that I use run into problems when they are called upon to edit or upload files into the system: I am basically forced to change the permissions of a folder to 777 for them to be able to work with/in the folder.

    I have set umask at 022, file ownership and group to my own by hand and set folder and file permissions as 775 and 666. For lack of a better description, when Wordpress uploads a file itself (as opposed to me FTPing it) it appears to be acting from outside the group/user I have set for folders.

    I will happily provide any requested output, but at this point I am basically banging my head off the wall on the issue.

    Here is an example with a folder named "05":
    mkdir 05
    chown -R myname:mygroup 05
    chmod -R 775 05
    ls -l 05
    drwxrwxr-x 2 myname mygroup 4096 May 2 18:11 05
    

    And an upload from within Wordpress to that folder returns:
    Sorry, there has been an error.
    
    The uploaded file could not be moved to /path/to/05.
    


Comments

  • Registered Users, Registered Users 2 Posts: 354 ✭✭AndrewMc


    Can you try making that folder world writable (chmod 777) and use "ls -l" to see what owner the uploaded file is created as. It's possibly something like "www-data" which is the user the Apache server is running as. It's that user that you need to allow access to, not your own.


  • Closed Accounts Posts: 4,763 ✭✭✭Fenster


    I just tested and you were absolutely correct in this. I cannot, however, change ownership to that user/group (permission denied). Time to elevate this. :D


Advertisement