質問

I have a Centos Server and I had a demo site running on apache. I decided to install and use Nginx instead of Apache. Everything went well until nginx user asked for my site folder permissions. So I did

chown -R nginx path/mysite_folder 

then I wasn't able to login from FTP, Plesk also has a lot of errors.

I deleted my domain/subscription from within Plesk and then I tried to create a new one, but I couldn't, Plesk wasn't able to create a new domain/subscription and gave me this error:

failed: Unable to create user protection directory:filemng: Error occurred during /bin/mkdir command

役に立ちましたか?

解決

In general ownerships and permissions can be restored.

For example if you modified only PP installation directory, you may run these commands in order to bring everything back to order:

Permissions and ownerships reset to their default settings:

for p in $(rpm -qa | grep plesk); do rpm --setugids $p; done
for p in $(rpm -qa | grep psa); do rpm --setugids $p; done
for p in $(rpm -qa | grep plesk); do rpm --setperms $p; done
for p in $(rpm -qa | grep psa); do rpm --setperms $p; done

The order in which you execute the commands is important.

You can also verify the correctness of the ownerships you have reset by comparing them with those on a working server. If all those actions fail then you can always re-install or update Plesk to the last version (11.5: supports Nginx) the user rights will be updated.

When ready add your nginx user to the root group using usermod command.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top