Re: what dose the command chflags used for ?

2003-06-19 Thread Supote Leelasupphakorn
 Dear all,
 
Because we have the command chmod for change
the
 permissions of
 files so what does the command chflags used for
and
 what suituation 
 I must use it ?

chflags is used to set system flags on files you
don't want to be
modified accidentally - most commonly the 'noschg'
flag stops a file
from being deleted by a normal user.

See the man page for more details, and also the -o
option to 'ls' (which
shows flag settings for files.

but chmod 600 those_file do the same thing why does
chflags come to play ?


Want to chat instantly with your online friends?  Get the FREE Yahoo!
Messenger http://uk.messenger.yahoo.com/
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: what dose the command chflags used for ?

2003-06-19 Thread Matthew Seaman
On Thu, Jun 19, 2003 at 07:46:39AM +0100, Supote Leelasupphakorn wrote:
  Dear all,
  
 Because we have the command chmod for change
 the
  permissions of
  files so what does the command chflags used for
 and
  what suituation 
  I must use it ?
 
 chflags is used to set system flags on files you
 don't want to be
 modified accidentally - most commonly the 'noschg'
 flag stops a file
 from being deleted by a normal user.
 
 See the man page for more details, and also the -o
 option to 'ls' (which
 shows flag settings for files.
 
 but chmod 600 those_file do the same thing why does
 chflags come to play ?

chflags(1) adds a number of controls impossible to achieve using the
standard filesystem permissions.

With chflags(1) you can make a file impossible to modify, even by the
super user, who can ignore the usual file permissions.

You can make a file that you can only add contents to -- not delete --
which is perfect for log files which you need to guarrantee haven't
been tampered with.

You can make a file whose contents can be modified, by the file itself
cannot be moved or deleted, even by a user who has write permissions
on the containing directory.

You can label a file such that the dump(8) program will ignore it. 

Finally, if you run at a raised kern.securelevel, you can only
increase the security protections added to files by chflags(1) -- in
order to remove the flags, you need to reboot into single user mode,
which requires you to have access to the system console. See
chflags(2), sysctl(8), security(7) and the FAQ entry at
http://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/security.html#SECURELEVEL
for details on securelevels.

Cheers,

Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.   26 The Paddocks
  Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey Marlow
Tel: +44 1628 476614  Bucks., SL7 1TH UK


pgp0.pgp
Description: PGP signature


Re: what dose the command chflags used for ?

2003-06-19 Thread Lowell Gilbert
Supote Leelasupphakorn [EMAIL PROTECTED] writes:

  Dear all,
  
 Because we have the command chmod for change
 the
  permissions of
  files so what does the command chflags used for
 and
  what suituation 
  I must use it ?
 
 chflags is used to set system flags on files you
 don't want to be
 modified accidentally - most commonly the 'noschg'
 flag stops a file
 from being deleted by a normal user.
 
 See the man page for more details, and also the -o
 option to 'ls' (which
 shows flag settings for files.
 
 but chmod 600 those_file do the same thing why does
 chflags come to play ?

Flags can't be removed (at all) under raised securelevels.

Most of the flags have semantics that can't fully be duplicated with
normal file permissions.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


what dose the command chflags used for ?

2003-06-18 Thread Supote Leelasupphakorn
Dear all,

   Because we have the command chmod for change the
permissions of
files so what does the command chflags used for and
what suituation 
I must use it ?

Thanks in advance,


Want to chat instantly with your online friends?  Get the FREE Yahoo!
Messenger http://uk.messenger.yahoo.com/
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: what dose the command chflags used for ?

2003-06-18 Thread Jez Hancock
On Thu, Jun 19, 2003 at 05:24:09AM +0100, Supote Leelasupphakorn wrote:
 Dear all,
 
Because we have the command chmod for change the
 permissions of
 files so what does the command chflags used for and
 what suituation 
 I must use it ?
chflags is used to set system flags on files you don't want to be
modified accidentally - most commonly the 'noschg' flag stops a file
from being deleted by a normal user.

See the man page for more details, and also the -o option to 'ls' (which
shows flag settings for files.

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]