Interview Preparation mode beta
Funny Facebook Status Funny Facebook Status
Enter your email address

Explain about Changing access rights in UNIX

Nice?Vote!

1 Answer

Nice?Vote!
chmod (changing a file mode)
----------------------------
Only the owner of a file can use chmod to change the permissions of a file. The options of chmod are as follows
Symbol     Meaning
u
    user
g
    group
o
    other
a
    all
r
    read
w
    write (and delete)
x
    execute (and access directory)
+
    add permission
-
    take away permission

For example, to remove read write and execute permissions on the file biglist for the group and others, type

% chmod go-rwx biglist

This will leave the other permissions unaffected.

To give read and write permissions on the file biglist to all,

% chmod a+rw biglist
Exercise 5a

Try changing access permissions on the file science.txt and on the directory backups

Use ls -l to check that the permissions have changed.
answered 1 year ago by siva (10,720 points)

Related questions