Results 1 to 3 of 3
I just upgraded my vps to use suPHP and I read somewhere that a file cannot have more than 755 set to it.
I would like to write a script ...
- 03-16-2008 #1Just Joined!
- Join Date
- May 2007
- Posts
- 24
Need help with a script please.
I just upgraded my vps to use suPHP and I read somewhere that a file cannot have more than 755 set to it.
I would like to write a script that will (recursively) check each directory within a users /home/username/public_html directory and change all the permissions of any files that are currently 777 to 755.
Can anyone please tell me how to do this?
- 03-16-2008 #2Linux Guru
- Join Date
- Nov 2007
- Location
- Córdoba (Spain)
- Posts
- 1,513
find should suffice:
This will echo the list of generated commands. If you agree with it, just remove the "echo" to actually run them and apply the changes.Code:find . -perm -777 -exec echo chmod 755 '{}' \;
- 03-16-2008 #3Just Joined!
- Join Date
- May 2007
- Posts
- 24
Awesome... Thanks.
This same question was on another popular linux forum and was there for the last 3 or 4 hours with no response. You answered in 8 minutes
Thanks!


Reply With Quote