[Sussex] Setting permissions on subdirectories

Geoff Teale tealeg at member.fsf.org
Sun Apr 27 20:00:01 UTC 2003


On Sunday 27 April 2003 11:18 pm, angelo servini wrote:
> Hi, could anyone please tell me which console command to use and the
> flags needed to set owners and permissions on all files in a
> subdirectory and its child subdirectories below that?

Right..

The commands are:

chown -R <username> directory
chmod -R <permissions> directory

in each case the -R means recursive (ie, it recurses down the tree).

THe chown command is fairly obvious, I suggest you do some reading of man 
pages concerning chmod, the permissions can be expressed in different ways.

> The reason I am asking is, that I saved off my original home directory
> and then re-installed my linux (xandros) partition. When I copied the
> home back in, I found that everything under home was re-assigned to root
> user!  Very frustrating when a letter written in OO refuses to save.

Thats because you copied it to and from a filesystem that didn't support the 
permissions system - this often happens if you back up files to CD-Roms or 
Windows partitions.

> Anyhow, my right index finger is burning up with all the mouse clicks
> inflicted on it via the kde way.  :-(  So I think "come on this is
> linux, there must be an easier way" :-)

Indeed :)

-- 
GJT
Free Software Foundation
tealeg at member.fsf.org




More information about the Sussex mailing list