WordPress.org

Ready to get started?Download WordPress

Forums

user/group id 99 file permission on domain-host (8 posts)

  1. kaushikgopal
    Member
    Posted 5 years ago #

    Hi good folk of WP,

    I have this issue. I moved my domain-host-server to 000webhost and went old school to manually install WordPress 2.7.1 . My blog is up and everything is functioning except.... the whole file permissions thing.
    Since I use the free version of 000webhost, I don't have shell access to chown my files directly. 000webhost has provided an option to chmod/chown everything to the username that they provide, whereas when WordPress by default creates a directory/file etc it creates it with the user/group id 99/99. Is there a place where I can change the user/group that WordPress uses when trying to acces/create a directory/file ? Alternatively I've read that this can be done through php scripts? If so would anyone be so kind as to let me know how, I've tried searching around but haven't found a solution.
    Many thanks in advance.
    Cheers
    K

  2. fotp
    Member
    Posted 5 years ago #

    I have the same issue during image uploads and WPP trying to create anew directory and upload images.

    My host has managed to bypass this issue, but only until WP creates another directory at the end of the month.

    changing Permissions with CHMOD didn't work and my host advised that WP tries to access the server under the group apache - which is why it cannot write the files to the corect locations.

    Any help will be greatly appriciated

    FoTP

  3. fotp
    Member
    Posted 5 years ago #

    I have had success in solving this issue!!

    On some servers, when WP writes a directory, it creates these directories with the ownership and group of apache (the default setting)

    Of course, depending on your host - not all servers are configured to run under name apache, so WP won't be able to write to the server - hence the problems with uploading files.

    This happens to me at the beginning of each month, when WP creates a new monthly file for content uploads.

    To rectify this problem, you have to CHOWN the affected directory using SSH - and then everything works fine.

    It's a very simple operation to do, using terminal on mac osx or and SSH utility like Putty on the PC.

    I hope this helps anyone else out there who has similar issues and is stumped by it all.

    FoTP.

  4. lcf
    Member
    Posted 5 years ago #

    Thanks, fotp. now we know the problem is 99/99 ownership and group. :)

  5. whooami
    Member
    Posted 5 years ago #

    On some servers, when WP writes a directory, it creates these directories with the ownership and group of apache (the default setting)

    thats NOT wordpress doing that -- that's PHP.

  6. birdboyee
    Member
    Posted 4 years ago #

    Im having the same similar problems. When I upload new content they automatically get owned by gpweb. I want them owned by ljohnson. How can I do that? I keep received administrative messages to clean up files because of this since they are not owned by me. We tried adding "@chown( $target, 'ljohnson' );" after line 1940 in wp-includes/functions.php file so it will create 'ljohnson' as the owner with no luck.

    See example below. my email is rudy2000k@yahoo.com, any assistance is greatly appreciated.

    /home/ljohnson/public_html/newsletter/wp-content
    $ ls -l
    total 32
    -rwxrwxrwx 1 ljohnson ljohnson 30 May 4 2007 index.php
    drwxrwxrwx 4 ljohnson ljohnson 4096 Aug 7 14:46 plugins
    drwxrwxrwx 5 ljohnson ljohnson 4096 Aug 7 12:37 themes
    drwxrwxrwx 2 ljohnson ljohnson 4096 Aug 7 14:47 upgrade
    drwxrwxrwx 3 ljohnson gpweb 4096 Aug 7 14:46 uploads
    $ cd uploads
    $ ls
    2009
    $ cd 2009
    $ ls
    07 08
    $ cd 08
    $ ls -l
    total 8552
    -rw-rw-rw- 1 gpweb gpweb 4357008 Aug 11 15:26 02-At-Last.mp3
    -rw-rw-rw- 1 gpweb gpweb 3382 Aug 11 15:22 meeting.jpg
    -rw-rw-rw- 1 gpweb gpweb 2698 Aug 11 15:25 meeting7.jpg

    ARGH!!!!

  7. Ujjwol
    Member
    Posted 4 years ago #

    Change the permission using the FTP Client

  8. Piyush Labs
    Member
    Posted 4 years ago #

    Thanks for the info guys.
    I have combined all these info found on different forums and answered by various techies.
    Its a bit long process, but it did work for me.

    It works for me in the following way:
    1. Setttings > Miscellaneous >
    Store uploads in this folder : wp-content/uploads [for me, it was already there by default]
    2. Organize my uploads into month- and year-based folders.
    Unchecked the above item.(Not copulsion, but u have to change permissions of respective folders.)
    3. Create the \wp-content\upload folder if it didn't exist.
    4. Do a "Fix File Ownership" from CPanel of 000webhost. (Keep this window open, coz u need to do this frequently.)
    5. Using FileZilla(ftp client) CHANGE the permission of upload folder to 777. (Yes, till when you want to upload).
    6. Use WP and upload the desired files. Once you are done with uploading of all files and do not want to upload any more proceed to next step.
    7. Do a "Fix File Ownership" from CPanel of 000webhost. This will change ownership of the files generally of "99/99" type to "your-userID".
    8. Now, you will be able to change the file permission of ALL FILES inside Upload folder to 644.
    9. Change back the file permission of Upload FOLDER to 755

    NOTE: all folders should be 755 and
    all files should be 644 to prevent unauthorize access to your files.
    Please, Do not leave them writable by World.

Topic Closed

This topic has been closed to new replies.

About this Topic