On Fri, 2002-10-04 at 12:49, David Busby wrote:
> When I create a mail directory as a user the 'ls -l' output looks like
> drwxrwxr-x    5 busby    busby        4096 Oct  3 16:57 mail
> 
> But if I create the mail directory as root for that user and (chmod 
> 0775) the output looks like
> drwxrwxr-x    2 root    root        4096 Oct  3 16:57 mail
> 
> When I create as root my PostFix install has a problem placing mail into 
> the ~/mail directory.  How can I switch the owner of the directory to 
> make the directory I created have the permissions of "5 busby busby" not 
> "2 root root".  

chown busby.busby mail

you have to be root to change the ownership to another user.

info changown has lots of stuff about these gnu utilites

What do the 5 and the 1 mean?

from the above mentioned info file for ls

`-l'
`--format=long'
`--format=verbose'
     In addition to the name of each file, print the file type,
     permissions, number of hard links, owner name, group name, size in
     bytes, and timestamp (by default, the modification time).  For
     files with a time more than six months old or in the future, the
     timestamp contains the year instead of the time of day.  If the
     timestamp contains today's date with the year rather than a time
     of day, the file's time is in the future, which means you probably
     have clock skew problems which may break programs like `make' that
     rely on file times.

number of hard links is the answer.  typically there will be one added
for each directory under the dir in question in addition to the 2 that
are always there.  I think the two hardlinks are one for the directory
that is obvioulsy in the parent dir and the one that is listed in the
dir itself as . or "this directory"

not a bad idea to play around with it until you understand it.

the following is what I get after creating three dirs:
$ mkdir testdir
$ mkdir testdir/testdir1
$ mkdir testdir/testdir2

$ tree testdir/  
testdir/
|-- testdir1
`-- testdir2

2 directories, 0 files
$ ls -d testdir 
testdir
$ ls -ld testdir
drwxrwxr-x    4 exhibito exhibito     4096 Oct  4 15:55 testdir

$ rmdir testdir/testdir1
$ ls -ld testdir
drwxrwxr-x    3 exhibito exhibito     4096 Oct  4 16:00 testdir


HTH Bret




-- 
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]?subject=unsubscribe
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to