• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Issue Unable to create directory wp-content/uploads/2016/09. Is its parent directory writable by the serve

joao

New Pleskian
First of all I would like to start saying that I have searched the answer to this trivial question all over the internet but I can't find a case where it fits my situation.

I have a server running Ubuntu 4.8.2 inside this server I have plesk installed to manage the domains I have. Each domain has Wordpress installed. I made a huge mistake of deleting the user that was managing the domains. After doing this I was able to change the user to another one and restore the server as it was. I have only one problem right now: I can't upload any files to the server.

Everytime I try to upload something to the server (or do something that requires creating or modifying) I get the error above.

I had the support team trying to help me resolve the issue but without luck. The response was "You should reinstall Plesk to avoid future problems" which basically translates to "I wasn't able to resolve the issue".

From what I gathered so far this is basically a permission issue. If I give full permision I can upload the files chmod -R 777 /var/www/vhosts/domain but I can't leave it like that for security reasons. If I get back to the usual 755 I get the error Is its parent directory writable by the server? I tried changing the ownership of the folder to www-data but it crashes the entire website.

ps aux | grep apache

root 62672 0.0 2.7 446320 28024 ? Ss 11:33 0:00 /usr/sbin/apache2 -k start
www-data 62675 0.0 0.5 158336 5300 ? S 11:33 0:00 /usr/sbin/apache2 -k start

ls -la /var/www/vhosts/domain/httpdocs/

drwxr-x--- 11 plesk_manager psaserv 4096 Aug 18 06:27 .
drwx--x--- 10 plesk_manager psaserv 4096 Sep 1 11:33 ..
drwxr-xr-x 3 plesk_transrail psacln 4096 Jun 1 18:31 blogs
drwxr-x--- 3 plesk_manager psaserv 4096 Jun 1 17:01 cgi-bin
drwxr-xr-x 2 plesk_transrail psacln 4096 Jun 1 17:01 css
-rwxr-xr-x 1 plesk_transrail psacln 1150 Jun 1 17:01 favicon.ico
-rwxr-xr-x 1 plesk_transrail psacln 235 Jun 2 17:50 .htaccess
drwxr-xr-x 4 plesk_transrail psacln 4096 Jun 1 17:01 img
-rwxr-xr-x 1 plesk_transrail psacln 418 Aug 18 06:27 index.php
-rwxr-xr-x 1 plesk_transrail psacln 19935 Aug 18 06:27 license.txt
-rwxr-xr-x 1 plesk_transrail psacln 7342 Aug 18 06:27 readme.html
-rwxr-xr-x 1 plesk_transrail psacln 70 Jun 8 19:42 robots.txt
drwxr-xr-x 2 plesk_transrail psacln 4096 Aug 18 06:27 tmp
drwxr-xr-x 3 plesk_transrail psacln 4096 Jun 1 17:51 wordpress
-rwxr-xr-x 1 plesk_transrail psacln 5456 Aug 18 06:27 wp-activate.php
drwxr-xr-x 10 plesk_transrail psacln 4096 Aug 18 06:27 wp-admin
-rwxr-xr-x 1 plesk_transrail psacln 364 Aug 18 06:27 wp-blog-header.php
-rwxr-xr-x 1 plesk_transrail psacln 1477 Aug 18 06:27 wp-comments-post.php
-rwxr-xr-x 1 plesk_transrail psacln 3162 Aug 18 06:27 wp-config.php
-rwxr-xr-x 1 plesk_transrail psacln 2853 Aug 18 06:27 wp-config-sample.php
drwxr-xr-x 7 plesk_transrail psacln 4096 Aug 18 06:27 wp-content
-rwxr-xr-x 1 plesk_transrail psacln 3286 Aug 18 06:27 wp-cron.php
drwxr-xr-x 17 plesk_transrail psacln 12288 Aug 18 06:27 wp-includes
-rwxr-xr-x 1 plesk_transrail psacln 2382 Aug 18 06:27 wp-links-opml.php
-rwxr-xr-x 1 plesk_transrail psacln 3353 Aug 18 06:27 wp-load.php
-rwxr-xr-x 1 plesk_transrail psacln 34057 Aug 18 06:27 wp-login.php
-rwxr-xr-x 1 plesk_transrail psacln 7786 Aug 18 06:27 wp-mail.php
-rwxr-xr-x 1 plesk_transrail psacln 13920 Aug 18 06:27 wp-settings.php
-rwxr-xr-x 1 plesk_transrail psacln 29890 Aug 18 06:27 wp-signup.php
-rwxr-xr-x 1 plesk_transrail psacln 4035 Aug 18 06:27 wp-trackback.php
-rwxr-xr-x 1 plesk_transrail psacln 3064 Aug 18 06:27 xmlrpc.php​

cat /etc/group

psaserv:x:1002:psaadm,psaftp,www-data,nginx
psacln:x:1003:

What I don't know is: When you have Plesk installed who does the upload to the server? Is it the www-data or is the user who is managing the domains assigned at Plesk?
 
Last edited by a moderator:
Hi joao,

for your information:
Each domain has it's own, unique "domain-system-user", who is as well the owner of files and folders. The group varies ( psaserv, psacln and psaftp ), but you should know, that the basic configuration should be:

Domain - docroot => domain-system-user : psaserv
Files and folders INSIDE the Domain - docroot: domain-system-user : psacln

At the moment, your group "psacln" does not include the system-user nginx and you will experience issues/failures/problems. Consider to use the command:

usermod -aG psacln nginx
 
Hi UFHH01

Thank you for your time for answering this question.
I tried the solution you provided but this is the error:

usermod: user 'nginx' does not exist

After this I did:
cat /etc/passwd | grep ngi


Result:

nginx:x:995:997:Nginx user:/var/lib/nginx:/bin/false


I'm sincerally losing my mind after such thing. If the passwd file says nginx is a user why does the usermod command says otherwise?!


Thank you for your time.
 
Hi joao,

a bit late my answer, but anyway:


Pls. keep in mind that "copy&paste" from the forum may cause issues, because HTML formats from the forums might be copied as well and being invisible pasted on your command line, so that your command could be incorrect.

Another solution is to add definitions manually inside of "/etc/passwd" and "/etc/group", if you like this option more.

Consider to post as well the corresponding line with the number from your grep - output, comparing it with the definitions from "/etc/group" for investigations.
 
Back
Top