Mass permissions change

apps

#1

I’m looking to take advantage of groups, but need to do a mass change of permissions.

Before I ask someone in support to do it for all the other users that aren’t me, I’d like someone to proofread it for me :).

I can change all 644s to 664s and 755s to 775 with:
find /home/[i]username[/i] -perm 0644 -exec chmod 0664; find /home/[i]username[/i] -perm 0755 -exec chmod 0775

Correct?


#2

I’m going through some old posts here…

If you just want to add group write it’s easier (and safer) to just do ‘chmod g+w blah’.

As to those finds, they should be something more like this:

find /home/username -perm 0644 -exec chmod 0664 {} ;

Your full command would be something like this:

find /home/username -perm 0644 -exec chmod 0664 {} ; ; find /home/username -perm 0755 -exec chmod 0775 {} ;

I would test those first by leaving off the exec and putting -ls instead and seeing what files they show. The command would be something like this:

find /home/username -perm 0644 -ls

  • Dallas
  • DreamHost Head Honcho/Founder