Unix change file permissions by owner

Hi Readers,

Lets say you want to change file permissions of all the files that you own in a particular directory. In such case, find command can be used to get all files for a particular user and chmod command can be used to change the file permissions. Following is the command:

find path -user username -exec chmod permission ‘{}” \;

eg: find . -user badal -exec chmod 2775 ‘{}’ \;



About Badal Chowdhary

I am a Software Engineer by profession. I have done SCJP and SCWCD certifications. Like working on cutting edge technologies and frameworks. Driven by challenges and fascinated by technology. I love playing and watching sports: Cricket, Ping Pong, Tennis, Badminton, Racket Ball and Gym.
This entry was posted in Unix and tagged , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s