BZU PAGES: Find Presentations, Reports, Student's Assignments and Daily Discussion; Bahauddin Zakariya University Multan Right Header

HOME BZU Mail Box Online Games Radio and TV Cricket All Albums
Go Back   BZU PAGES: Find Presentations, Reports, Student's Assignments and Daily Discussion; Bahauddin Zakariya University Multan > Institute of Computing > Bachelor of Science in Information Technology > BsIT 6th Semester > System Admin

System Admin Sir Ahmad Kareem


Reply
 
Thread Tools Search this Thread Rating: Thread Rating: 1 votes, 3.00 average. Display Modes
  #1  
Old 08-04-2010, 10:47 PM
.BZU.'s Avatar


 
Join Date: Sep 2007
Location: near Govt College of Science Multan Pakistan
Posts: 9,693
Contact Number: Removed
Program / Discipline: BSIT
Class Roll Number: 07-15
.BZU. has a reputation beyond repute.BZU. has a reputation beyond repute.BZU. has a reputation beyond repute.BZU. has a reputation beyond repute.BZU. has a reputation beyond repute.BZU. has a reputation beyond repute.BZU. has a reputation beyond repute.BZU. has a reputation beyond repute.BZU. has a reputation beyond repute.BZU. has a reputation beyond repute.BZU. has a reputation beyond repute
Read Chmod permission to files in linux ; Linux Terminal Commands;

------------
Show long listing of the root directory.
The first column shows the permission strings, which grants permission for accessing files and directories.
The second column shows the number of hard links to a file or a directory.
Third column shows the owning user.
Fourth column shows the group that owns the file or directory.
Fifth column shows the file size.
Next column shows the creation date and time the file or directory was created.
Next column shows the file or directory name.
------------
Let's take a permission string as an example.

drwxr-xr-x

The first 'd' means it's a directory.
If the first letter is 'l', it's a link.
If it's a '-', it's a normal file.
Positions 2 to 4 is the permission of the owning user.
'r' means permission to read is granted.
'-' means permission to read is denied.
'w' means permission to write is granted.
'-' means permission to write is denied.
'x' means permission to execute is granted.
'-' means permission to execute is denied.
Positions 5 to 7 are the permissions to the owning group.
The last three positions are permissions for other users. Other users are those who are not owners, or are not members of the owning group.

This permission string -rw-r--r-- means it's a normal file. Read/Write permission is granted to the owner. Read permission is granted to both the owning group and all other users.

To deny the read access of the file to all other users, run
Code:
chmod o-r tmpfile1
'chmod' stands for change mode.
'o' stands for other which means all other users
'-' stands for remove permission
'r' stands for read permission
'tmpfile1' is the file name.

Now, the permission string becomes '-rw-r-----' as the read permission for all other users is removed.

To remove the read and write permission of the owning group, run
Code:
chmod g-rw tmpfile1
where g means 'owning group'.

Now, the permission string becomes '-rw-------' as the read and write permissions of the owning group are removed.

To grant read permissions to the all users, run
Code:
chmod ugo+r tmpfile1
where '+' stands for grant.

Now, the permission string becomes '-r--r--r--' as the read permission for all users has been granted.

To allow the owner to execute the file, run

Code:
chmod u+x tmpfile1
where x stands for the execution permission.

The execute permission is granted to the owner.
__________________
(¯`v´¯)
`*.¸.*`

¸.*´¸.*´¨) ¸.*´¨)
(¸.*´ (¸.
Bzu Forum

Don't cry because it's over, smile because it happened
Reply With Quote
Reply

Tags
chmod, commands, files, linux, permission, terminal


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Introduction to Linux Slides. Muhammad Atique Network Operating Systems Fundamentals ? I 0 02-03-2011 06:09 PM
Linux administration course Waqas Ahmed User links/Others sites links 2 08-04-2010 11:04 PM
Linux Terminal Commands; Working at linux console mode, .BZU. System Admin 0 08-04-2010 10:46 PM
Linux beauty irfishahpk Linux World 0 17-08-2009 11:12 PM

Best view in Firefox
Almuslimeen.info | BZU Multan | Dedicated server hosting
Note: All trademarks and copyrights held by respective owners. We will take action against any copyright violation if it is proved to us.

All times are GMT +5. The time now is 08:51 PM.
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.