Questions tagged [permissions]

Short for "file system permissions" - access control based on user, group, or global access.

In a Linux file system every file has some metadata attached to it that controls who is allowed to access it, and what they are allowed to do. Human users and system users are subject to these rules. Permissions are set separately for the owner and group owner of a file and for all others. The only user who can gain and grant permission to do anything to any file, regardless of ownership, is root. Normal users can access root's privilege using sudo.

The read, write and execute attributes have different meanings for files and for directories:

There are also special permission bits. One is setuid, which allows the user executing a program to do so as the file's owner. The main use for this is the sudo program. Another is setgid, which causes the user's effective group ID to be that of the group that owns the file. The main use for this is creating directories that need to be shared by multiple users so that files created in them will be accessible to group members. Another is the "sticky bit", only applicable to directories, which restricts permission on renaming and deleting files inside them.

File permission settings are also called the file's mode and are modified by the chmod (change mode) command. chmod recognises symbolic notation, using the letters u (owner) g (group) o (others) and a all to + (add) or - remove permissions. chmod also recognises octal notation, for example 644 corresponds to -rw-r--r-- File ownership is changed using the chown command.

The default mode of files or directories created in a system is defined by the umask

In addition to the traditional permissions system, an extension to it that provides more fine-grained control is the ACL (access control list) system, which allows permissions to be specified for a single user.

7506 questions
324
votes
5 answers

Give specific user permission to write to a folder using +w notation

I know I can assign the permission to write to an owner/group/others like this: chmod u+w myfolder Can I specify the specific user here? Some like this: chmod username u+w myfolder
Max Koretskyi
  • 3,691
  • 4
  • 17
  • 19
97
votes
5 answers

How can I recursively change the permissions of files and directories?

I have ubuntu installed on my local computer with apache / php / mysql. I now have a directory at /var/www - inside which I have several of my ongoing projects. I also work with opensource ( drupal, magento, sugarcrm ). The problem I am facing is…
Nikhil
  • 1,185
87
votes
2 answers

Allowing a group Read-Write Access to a directory

I have two users, user1 and user2, that are both members of groupA. user2 has a folder in their home directory called folderA. If they wish to allow read-write-execute permissions for all members of groupA, how would they do this? What if folderA…
WxPilot
  • 1,856
  • 2
  • 19
  • 25
73
votes
3 answers

What command changes the Group setting for a directory?

I am having an access problem to some files and directories that I have tracked down to the group assigned to access them. When I manually change the name of the group in the properties/permissions menu for a directory from the default setting…
Ashlar
  • 965
  • 2
  • 7
  • 10
63
votes
5 answers

How do I edit the /etc/hosts file?

I'm new at Linux and I just download Ubuntu 12.04 LTS. I found a spot that showed me how join my Windows Active Directory. It has me add couple lines into the 'hosts' but I'm not able to edit the file because I do not have the permission. I'm not…
Jim
  • 631
  • 1
  • 5
  • 3
56
votes
12 answers

How do I set read/write permissions my hard drives?

I've recently installed Ubuntu 11.10 on my laptop, but I can't do anything with my 1.5TB external drive, and my 500GB because I don't have write permission. Are there any specific commands I can use in the terminal to set the read/write…
Solarton
  • 561
48
votes
1 answer

What's an uppercase 'T' at the end of unix permissions?

What's that capital 'T' in the permissions mean, and how does it work? Is it related to this 'sticky bit' thing I've heard about but never quite understood?
wim
  • 12,738
46
votes
2 answers

Adding user to a group - Why had to reboot?

I was not able to access the VirtualBox shared folder, so I made the user part of the vboxsf group. But, still not able to access it. Rebooting the guest resolved the problem. Is it a bug? A reboot is not required to add a user to a group. sudo…
40
votes
4 answers

Permission denied when trying to open a file in gimp

When I try to open a .psd file using gimp I get this error: Opening '/media/anonoymous/Other's/Practise/bootstarp/design.psd' failed: Could not open '/media/anonoymous/Other's/Practise/bootstarp/design.psd' for reading: Permission denied What…
md alam
  • 501
35
votes
4 answers

Permissions issue: how can Apache access files in my Home directory?

I know file permissions have been covered on here before, but im struggling to get my head around the concept for my scenario. I created the files on an old ubuntu installation. Ive copied the files into my new ubuntu installation and put them in…
richzilla
  • 12,045
31
votes
5 answers

How can I check the permissions of a specific group?

I've a group on my system and I don't know which permission it has. Where can I find all group permissions? I want to have an output like this: folders owned by group 'test' /home/test/Documents/ /home/test/Pictures/ /var/www/website/ …
OrangeTux
  • 5,195
  • 8
  • 36
  • 57
23
votes
1 answer

How do I prevent one user in particular from accessing my home directory?

There's a specific user that I don't want to be able to access my home directory. How do I deny access to them, while still allowing access to others who would normally have it?
Rob John
  • 343
23
votes
2 answers

What is meant by mask and effective in the output from getfacl?

What is meant by mask and effective in the output from getfacl? getfacl /var/www: getfacl: Removing leading '/' from absolute path names file: var/www owner: Name group: Name user::-wx user:Test:rwx effective:r-- group::rw- …
18
votes
2 answers

What does the permission string lrwxrwxrwx mean?

When I cd to / and enter the command: ls -ls for some files/folders it gives output like: 0 lrwxrwxrwx. 1 root root 7 Jan 30 2018 bin -> usr/bin So what actually is this lrwxrwxrwx?
idaljeetsingh
  • 185
  • 1
  • 2
  • 8
17
votes
3 answers

When are "User Privileges" relevant?

I notice that many of the user privileges in "Users and Groups" are not ticked on my user, but I still have access to the items they specify. For example, I'm constantly using VirtualBox for virtualisation, I can connect to wireless and wired…
Scaine
  • 11,139
1
2 3
31 32