chown step-by-step as an example
J.Markoll
j.markoll at free.fr
Mon Aug 8 17:50:06 UTC 2005
ZIYAD A. M. AL-BATLY a écrit :
> On Mon, 2005-08-08 at 11:05 +0200, J.Markoll wrote:
>
>>Hello,
>>I find it is a good example to understand better how the rights on files
>>function.
>>In the 'sudo chmod -R a+rX,go-w /home/upload' command,
>>chmod #change rights
>>a #all
> This is all true.
>>+rX #give rights to read (r) and gives rights to execute (X) I suppose ?
> Yes. 'x' and 'X' differ in that 'x' will give 'eXecute' permission all
> the time, while 'X' will give that permission if the owner have execute
> bit set already. Try with some files/directories to find out more. 'X'
> is very useful when changing the permission for a lot of files that some
> of them need the execute bit set, or a mix of files and directories and
> you want to grant execute bit for directories but not for files (or a
> mix of both cases).
Ah ok! nice to know the difference.
>>so 'g' groups, and 'o' others, will have the write (w) suppressed ?
> Correct.
>>Thus nobody has the rights to write, among 'all', 'group' and 'others'.
>>Then the only one who will have all the writes will be root, being the
>>owner of the folder.
> Some what: Yes. The above command ensure that "group" and "other" don't
> have any write permission only. This doesn't mean that the "user"
> already have those rights.
I should have said: the rights to write :)
... I wrote too fast.
> The owner most have that right already if he/she wants to write to those
> files/directories since in the above command, no "write" permission was
> granted to that user for sure. Of course, the special case user "root"
> have super privileged, and thus need not any file-system permission for
> him/her to write to files. Scary!
The owner of a file (file being equal to directory equal to folder in a Unix
type system definition as everything is considered as file) can always
be changed by root if necessary.
>>Did I understand perfectly ?
>>J.Markoll.
> Yes and thanks for your illustration. It made it very easy for anyone
> who doesn't know what "chmod" do.
> Thanks again.
> Ziyad.
Thanks to you also for the detailed precisions and confirmations.
J.Markoll.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 256 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20050808/94adc7f0/attachment.sig>
More information about the ubuntu-users
mailing list