Skip to main content

Websites report permission errors when trying to write/modify files

Comments

17 comments

  • cPRex Jurassic Moderator
    Hey there! You mention "the files created in this form" - is this a web form on a certain page of your site? In general, if you upload content such as media files through WordPress, do those work as expected?
    0
  • kon33
    No, sorry, my bad. I meant files created by any upload mechanism while the directory tree's permissions are on 770 with "username:nobody" ownership, including media files through Wordpress. If I leave the website with default permissions (650 for files, 750 for directories) and ownership (username:username) the files aren't uploaded, and I get an error message saying it has no write permissions.
    0
  • cPRex Jurassic Moderator
    Are we sure that isn't the issue right there? I'd expect things to be 644/755, respectively.
    0
  • kon33
    What would the ownership be like? "username:nobody" or "username:username" ? Also, would the entire directory tree be 755?
    0
  • cPRex Jurassic Moderator
    I expect everything to be username:username inside the public_html directory. All directories that will be available on the web would be 755.
    0
  • kon33
    Just tried changing the whole tree and files within it to the permissions and ownership you mentioned, it's now failing again with permission errors. Is the public_html directory also supposed to be username:username? I just tried both ways (while the rest of the files remained as username:username and 644/755) and it still won't work.
    0
  • quietFinn
    public_html should be username:nobody, with permissions 750.
    0
  • kon33
    Yup, had it just like that. Still get permission errors.
    0
  • quietFinn
    What is the PHP Handler you use?
    0
  • kon33
    Where can I check that? In MultiPHP Manager I have "PHP 7.4 (ea-php74)" as the default PHP version, with PHP-FPM enabled on all domains.
    0
  • quietFinn
    In the same page where you set the default PHP version and PHP-FPM you have list of PHP Handlers.
    0
  • cPRex Jurassic Moderator
    public_html is also user:user You're always welcome to submit a ticket to our team so we can check the interaction between the PHP handler and the permissions on the system directly.
    0
  • quietFinn
    public_html is also user:user

    I checked that in a few servers and it's always user:nobody :rolleyes:
    0
  • kon33
    In the same page where you set the default PHP version and PHP-FPM you have list of PHP Handlers.

    Interesting. They all are on "cgi", no other PHP Handlers are installed (I'm guessing this is the reason I'm having this problem). I see in your screenshot you have suphp. Is this provided by mod_suphp?
    0
  • cPRex Jurassic Moderator
    Yes - you can change the handler to suPHP and that will likely resolve the issues.
    0
  • quietFinn
    Interesting. They all are on "cgi", no other PHP Handlers are installed (I'm guessing this is the reason I'm having this problem). I see in your screenshot you have suphp. Is this provided by mod_suphp?

    If you read here:
    0
  • kon33
    Good news, installing mod_suphp has fixed the problem. Thanks everyone for the help.
    0

Please sign in to leave a comment.