Most file systems have designated directories to assign permissions or access rights to specific users. File permission controls users to view, change, navigate & execute the designated contents of the file directories. LINUX/UNIX coherently use file permission to enable access to ownership for files & directories. File permission includes rwx is for read, write, and execute permissions.
$ ls –la 2. Create an empty file called “A.txt”. Let’s look at the file permissions for “A.txt”.
$ ls –l A.txt Linux ls –l commands lists the file –show permission assigned to A.txt.
-rw-rw-r—everyone has the rights & priviledges to read, write and execute permission for directories.
3. Let’s add executable permissions …show more content…
The file permission changes to –rwxrw –r for the files A.txt. File permission includes rwx is for read, write, and execute permissions.
-rwxrw –r
-filw type & directory Rwx-permission (read, write & execute) for the owner of the files.
Rw- permission (read, write & execute) for the group owning the files. r-- permission (read, write & execute) for all the users.
4. Add read permissions to “A.txt”.
$ chmod g-r A.txt chmod g-r A.txt gives read permission to the owner of the …show more content…
write permissions for everyone.
$ chmod 666 A.txt $ chmod 666 A.txt will change the file permissions of file A.txt to -r w – r w – r w – which means owner, group, other can read and edit the file.
7. Provide ownership access rights to read, write, and execute permissions; give the group read and write permissions; and give all others read permissions for “A.txt”.
$ chmod 764 A.txt $ chmod 764 A.txt will change the file permissions of file A.txt to -rwxrw–r- which means owner, group, other can read and edit the file (Every one can read, group including owner can write, owner alone can execute).
References
Linux.org. (n.d.). File Permissions - chmod. Retrieved March 21, 2018, from https://www.linux.org/threads/file-permissions-chmod.4124/
Shields, I. (2010, November 30). Manage file permissions and ownership. Retrieved March 21, 2018, from