Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: A Script for Fixing File Permissions  (Read 2543 times)

0 Members and 1 Guest are viewing this topic.

dustin

  • Guest
A Script for Fixing File Permissions
« on: December 21, 2013, 03:02:23 pm »
Steps to run fixperms on your VPS
===

1 wget fixperms and run for a single user

To use the fixperms script, simply log into your server as root, wget the file from our server, then run it. Type in the cPanel username and it will run only for that particular account.

It does not matter which directory you are in when you run fixperms. You can be in the user’s home directory, the server root, etc. The script will not affect anything outside of the particular user’s folder.

wget http://img.servint.net/fixperms.sh.gz
gunzip fixperms.sh.gz
sh fixperms.sh -a USER-NAME

2 Running fixperms for all of the users

If you would like to fix the permissions for every user on your cPanel server, simply use the ‘–all’ option:

sh fixperms.sh --all

3 Verbosity of fixperms

By default, the script runs in a ‘quiet’ mode with minimal display. However, if you want to see everything that is happening, you can turn on verbosity using the ‘-v’ flag and have the script print to the screen everything that is being changed.

This is extremely useful when fixing large accounts that have many files. You can watch the changes as a sort of ‘progress bar’ of completion. The ‘-v’ flag can be used per account or with all accounts.

For one single account:

sh fixperms.sh -v -a USER-NAME

For all accounts:

 sh fixperms.sh -v --all

=====