488891
105
Zoom out
Zoom in
Previous page
1/178
Next page
As root, you can also change the ownership of a le: with the command chown
(change owner) you can transfer ownership to a new user.
7.5.1 Examples for Changing Access Permissions and Ownership
The following example shows the output of an ls -l command in a shell.
Example 7.1 Access Permissions For Files and Folders
-rw-r----- 1 tux users 0 2006-06-23 16:08 checklist.txt
-rw-r--r-- 1 tux users 53279 2006-06-21 13:16 gnome_quick.xml
-rw-rw---- 1 tux users 0 2006-06-23 16:08 index.htm
-rw-r--r-- 1 tux users 70733 2006-06-21 09:35 kde-start.xml
-rw-r--r-- 1 tux users 47896 2006-06-21 09:46 kde_quick.xml
drwxr-xr-x 2 tux users 48 2006-06-23 16:09 local
-r-xr-xr-x 1 tux users 624398 2006-06-23 15:43 tux.jpg
In the example above, user tux owns the le kde-start.xml and has read and write
access to the le but cannot execute it. The users group can read the le but cannot
write or execute it. The same holds true for the other users as shown by the third
block of characters.
Procedure 7.4 Changing Access Permissions
Suppose you are tux and want to modify the access permissions to your les:
1
If you want to grant the users group also write access to kde-start.xml, enter
chmod g+w kde-start.xml
2
To grant the users group and other users write access to kde-start.xml, enter
chmod go+w kde-start.xml
3 To remove write access for all users, enter
chmod -w kde-start.xml
If you do not specify any kind of users, the changes apply to all users— the
owner of the le, the owning group and the others. Now even the owner tux
does not have write access to the le without rst reestablishing write permis-
sions.
4
To prohibit the usersgroup and others to change into the directory local,
enter
chmod go-x local
5
To grant others write permissions for two les, for kde_quick.xml and gnome
_quick.xml, enter
Shell Basics 95
105


Need help? Post your question in this forum.

Forumrules


Report abuse

Libble takes abuse of its services very seriously. We're committed to dealing with such abuse according to the laws in your country of residence. When you submit a report, we'll investigate it and take the appropriate action. We'll get back to you only if we require additional details or have more information to share.

Product:

For example, Anti-Semitic content, racist content, or material that could result in a violent physical act.

For example, a credit card number, a personal identification number, or an unlisted home address. Note that email addresses and full names are not considered private information.

Forumrules

To achieve meaningful questions, we apply the following rules:

Register

Register getting emails for Suse openSUSE 11.3 at:


You will receive an email to register for one or both of the options.


Get your user manual by e-mail

Enter your email address to receive the manual of Suse openSUSE 11.3 in the language / languages: English as an attachment in your email.

The manual is 7 mb in size.

 

You will receive the manual in your email within minutes. If you have not received an email, then probably have entered the wrong email address or your mailbox is too full. In addition, it may be that your ISP may have a maximum size for emails to receive.

The manual is sent by email. Check your email

If you have not received an email with the manual within fifteen minutes, it may be that you have a entered a wrong email address or that your ISP has set a maximum size to receive email that is smaller than the size of the manual.

The email address you have provided is not correct.

Please check the email address and correct it.

Your question is posted on this page

Would you like to receive an email when new answers and questions are posted? Please enter your email address.



Info