On cPanel servers, you can bulk adjust write permissions and permissions on users’ files. This situation is frequently encountered when performing operations on sites’ FTPs via SFTP with the root user. That is why I always keep fixperms.sh ready on my servers. I apply it after every FTP operation performed with root.
First, I switch to a directory;
cd /usr/local/src
“cd” means to enter the directory, i.e., the folder usr local src.
wget https://raw.githubusercontent.com/PeachFlame/cPanel-fixperms/master/fixperms.sh
chmod +x fixperms.sh
The wget command fetches the file.
The second command grants write permission to the fetched file; the command containing chmod.
Switch to the directory where you downloaded it on the server; we used cd /usr/local/src above to switch to the directory
sh ./fixperms.sh -a kullanıcıadı
When you enter the user’s name, it adjusts write permissions and permissions for all files in that user’s public_html.
If we want to run it in bulk for all users;
sudo sh ./fixperms.sh -all
It will download the current version directly from the GitHub path above. However, if you wish to get it directly from GitHub: