SSH Featured

SSH: Different chmod for files and directories

There are commands to setup access rights for files and directories separately and recursively.

Setup rights for files:

find /path/to/work/dir -type f -exec chmod 644 {} \;

And setup rights for directories:

find /path/to/work/dir -type d -exec chmod 755 {} \;

It works fast and stable. Have fun!

My primary work laptop works with Windows OS and there is completely different files and directories access method and rights than in Unix Family OS.

Some times ago I’ve used FTP protocol to publish web projects to live servers and also used it to setup correct access rights for project files and directories. When I began use git as a version control software I tried use SSH protocol to publish projects on live servers from repository and I liked it, but if I needed to set different than default access right for any files I use FileZilla and FTP protocol. It was awful.