• Halloween is coming! To celebrate the occasion, we dusted off a couple of old skins, and even created a brand new one (Pixel).
    To get into the festive spirit, install the Skins extension.
  • The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • The Plesk Mobile apps for iOS and Android and the Plesk Mobile Center extension have been deprecated, and are no longer available for new installations. In Plesk Obsidian 18.0.84, the Plesk Mobile Center extension will be removed from servers during the upgrade, and the Plesk Mobile apps will lose their server management features.
  • The Social Login extension has been deprecated and will be removed in Plesk Obsidian 18.0.84. After that, it will no longer be possible to log in to Plesk with a Google, Facebook, GitHub account, or with a passkey. Plesk usernames and passwords, as well as logging in with a WebPros Account, are not affected.

Permissions & user groups issue

K

krise

Guest
I am using Plesk 8.3 with linux on a dedicated server with PHP/MySQL/Apache. This is the basic directory structure.

<mydomain>/logs
<mydomain>/httpdocs
<mydomain>/src

The application is web based and therefore runs as apache user. There are also some cron jobs that update files used by the app. Currently I am just uploading the files and setting up crontab via SSH (done using ftp user 'sam' created thru Plesk therefore in psacln group). I have come across some permission problems because the cron user is different from the apache user. I need a solution to ftp files to my server and have apache and the cron jobs modify certain files such as the logs and some other files and avoid permission problems.

I am considering these options:

1. Have the apache user run the crons but by default apache user has 'nologin'. Is there any problem changing this? This might be the simplest solution. I would then also ftp the files as apache so everything is done by one user.

2. Create a new group 'mydomain' and add apache and sam to it. I would still have to periodically set the group permissions on the files (*).

3. Add sam, the user that sets the cronjob, to group psaserv. Unless this is the recommended way to do this I would prefer to go with 2. Is there any reason to add or not to add sam to psaserv?

(*) I have read and also tested that setgid doesnt work on linux and that umask only works for process that sets it (and child processes) and is global.

It seems like others should have faced this issue. It would be great to hear how others approach permissions issue with plesk? Please keep your responses specific to linux though to avoid confusion.
 
Back
Top