Hi everyone,

I’m a unix newbie, can anyone tell me how to do this with chmod?

I want to change all the attributes of directories to 755, attributes of all the files in those directories to 644.

Thanks in advance!


If you use an FTP client you should see an option to change the permissions of a file/folder. Usually you select the file/folder then right click to bring up the context menu.

If you use SSH to connect to your shell then use chmod 644 filename/foldername (more than one separated by a space).

Are you sure you know why you want to do this?

See chmod in the DreamHost Wiki here


Opinions are my own views, not DreamHosts’.
I am NOT a DreamHost employee OK!! :@

You act on my advice at your own risk!

Thanks, my case is more complicated, there are too many directories and files that I can’t do that only with chmod. But problem was solved now, I used find command in combination with chmod, for example, here is what I did

find /home/username/xxx.yyy/* -type f -exec chmod 644 {} ;

In the shell there are good tricks to do:

find . -type d -exec chmod 755 {} ; <- finds and change the permisions for directories, from the directory Iam now (current directory)
find . -type f -exec chmod 644 {} ; <- for the files… (see, -d -directory- -f -files-)
find . -iname “*.php” -exec chmod 633 {} ; <- for example only change permissions to php files