• Resolved aoberoi

    (@aoberoi)


    This is frustrating but i had this working last week so I know it is possible.

    I don’t want to give the uploads directory chmod 777. It is in a directory owned by my local user on my machine. I thought ACL’s were the proper solution to manage permissions because it is frankly outside the scope of unix file permissions.

    Like I said, I had this working, but then to upgrade from 3.0.1 to 3.0.2 i followed the manual instructions, and I guess i ended up replacing the contents of the uploads folder (might have been by mistake). I also changed the site’s address in the setting to my external IP after setting up port forwarding through my router. After upgrading, I Iost the ability to do Media uploads so I went to try and fix the permissions myself. I set them to what I think they ought to be, but it does not seem to allow me to upload new media. I keep getting an error message that says:

    “83605924.jpg” has failed to upload due to an error
    The uploaded file could not be moved to /Users/Ankur/Design/Projects/RestoManifesto/root/wp-content/uploads/2010/12.

    here is the output of the ls -ela command in the wp-content directory:

    AnkurMac:wp-content Ankur$ ls -ela
    total 8
    drwxr-xr-x@  7 Ankur  staff   238 Dec  2 03:48 .
    drwxr-xr-x+ 40 Ankur  staff  1360 Dec  2 13:15 ..
     0: user:_www allow list,add_file,add_subdirectory,readattr,writeattr,readextattr,writeextattr,readsecurity
    drwxr-xr-x   7 Ankur  staff   238 Dec  3 23:32 .svn
    -rw-r--r--@  1 Ankur  staff    30 May  4  2007 index.php
    drwxr-xr-x@  8 Ankur  staff   272 Dec  2 13:15 plugins
    drwxr-xr-x@  9 Ankur  staff   306 Dec  2 13:15 themes
    drwxr-xr-x+  5 Ankur  staff   170 Dec  2 15:38 uploads
     0: user:_www allow list,add_file,search,delete,add_subdirectory,delete_child,readattr,writeattr,readextattr,writeextattr,readsecurity,file_inherit,directory_inherit

    I pretty much gave the uploads directory every permission except writesecurity and chown.

    Does anyone have any idea where I am going wrong here? If it helps, I am able to update the permalink structure which to my understanding writes to the .htaccess file.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter aoberoi

    (@aoberoi)

    i don’t even think this is a permissions thing anymore because i set chmod 777 uploads/ and i STILL get the same error message.

    I’ve also set the uploads directory to wp-content/uploads in the Settings area. Any other ideas here?

    Thread Starter aoberoi

    (@aoberoi)

    FIX!

    okay so the key concept here is that the file_inherit and directory_inherit flags only work for NEW files that are created inside those directories. since i was uploading an image and it was trying to write to an existing directory (2010/12), i was getting the error because the ACL’s permissions wouldn’t apply. the solution is to manually apply those permissions to all of the directories inside (which seems a little less elegant than it should be – so if you have any ideas on a better way please tell) and now uploads work as they should.

    proof that you don’t need 777 on ur uploads folder though.

    I had the same problem on my virtual private server. Finally gave up and submitted a support ticket. Wish I knew what they did – but whatever it was, it worked.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘using ACL to give write permission to uploads directory’ is closed to new replies.