is 'chmod' not allowed in shared storage?

forgive me if question sounds stupid, I don't have much knowledge on php hosting. Here is the error log. 2025-05-08T15:02:39.651Z  [node-id-1.runtime.phpnginx.zerops]━━━━ ✅ cat /etc/passwd ━━━━ 2025-05-08T15:02:39.651Z  [node-id-1.runtime.phpnginx.zerops]━━━━ 🙏 ls -ld /var/www 2025-05-08T15:02:39.664Z  [node-id-1.runtime.phpnginx.zerops]drwxr-xr-x 1 zerops zerops 0 May 8 15:02 2025-05-08T15:02:39.664Z  [node-id-1.runtime.phpnginx.zerops]drwxr-xr-x 62 zerops zerops 101 May 8 15:02 /var/www 2025-05-08T15:02:39.666Z  [node-id-1.runtime.phpnginx.zerops]━━━━ ✅ ls -ld /var/www /mnt/sharedstorage/moodledata ━━━━ 2025-05-08T15:02:39.666Z  [node-id-1.runtime.phpnginx.zerops]━━━━ 🙏 sudo chown www-data:www-data /mnt/sharedstorage/moodledata ━━━━ 2025-05-08T15:02:39.683Z  [node-id-1.runtime.phpnginx.zerops]zerops : PWD=/var/www ; USER=root ; COMMAND=/usr/bin/chown www-data:www-data /mnt/sharedstorage/moodledata 2025-05-08T15:02:39.698Z  [node-id-1.runtime.phpnginx.zerops]━━━━ ✅ sudo chown www-data:www-data /mnt/sharedstorage/moodledata ━━━━ 2025-05-08T15:02:39.700Z  [node-id-1.runtime.phpnginx.zerops] 2025-05-08T15:02:39.700Z  [node-id-1.runtime.phpnginx.zerops] 2025-05-08T15:02:39.700Z  [node-id-1.runtime.phpnginx.zerops]━━━━ 🙏 chmod 755 /mnt/sharedstorage/moodledata ━━━━ 2025-05-08T15:02:39.724Z  [node-id-1.runtime.phpnginx.zerops]chmod: changing permissions of '/mnt/sharedstorage/moodledata': Operation not permitted 2025-05-08T15:02:39.734Z  [node-id-1.runtime.phpnginx.zerops]━━━━ ❌ chmod 755 /mnt/sharedstorage/moodledata => 1 (exited with 1) ━━━━ 2025-05-08T15:02:39.734Z  [node-id-1.runtime.phpnginx.zerops] 2025-05-08T15:02:39.734Z  [node-id-1.runtime.phpnginx.zerops] 2025-05-08T15:02:39.734Z  [node-id-1.runtime.phpnginx.zerops]❌ RUN.INIT COMMANDS FINISHED WITH ERROR
2 Replies
Michal Saloň
Michal Saloň4w ago
It is probably caused because you used chown to change ownter to www-data of the folder. All your commands run under zerops:zerops, which isn't part of www-data. My recommendation would be to not use www-data at all, but if you need to, then you would have to use sudo chmod not just chmod, or use chmod before the chown.
minsomai
minsomaiOP4w ago
ok thank you

Did you find this page helpful?