Most current file systems have methods of administering permissions or access rights to specific users and groups of users. These systems control the ability of the users to view or make changes to the contents of the filesystem.
Questions tagged [file-permissions]
1358 questions
678
votes
7 answers
Permissions on private key in .ssh folder?
I changed my permissions in my .ssh folder and now when I use a piece of software that uses my private key, I have to type my password each time. What should my permissions be on my id_rsa file to not have to type a password each time I use an app…
Jody G
139
votes
4 answers
How do file permissions apply to symlinks?
Let's say you have this structure:
+ directory
-- file1
-- file2
-- file3 -> /tmp/file3
file3 is a link to another file3 somewhere else on the system.
Now let's say I chmod 777 the directory and all contents inside it. Does my file3 in /tmp receive…
nopcorn
- 16,982
105
votes
8 answers
Why does chown report "Operation not permitted" on OS X?
I am trying to do the following on my Mac (10.6.7):
sudo chown myusername:wheel ./entries
but Unix/Mac is returning "Operation not permitted". When I ls -lash the culprit file, it looks as follows:
8 -rwxrwxrwx 1 myusername staff 394B Apr 26…
josef.van.niekerk
- 2,283
103
votes
3 answers
Give write permissions to multiple users on a folder in Ubuntu
There is a folder that is owned by user tomcat6:
drwxr-xr-x 2 tomcat6 tomcat6 69632 2011-05-06 03:43 document
I want to allow another user (ruser) write permissions on document folder. The two users (tomcat6 and ruser) does not belong to same…
TheVillageIdiot
- 1,427
92
votes
3 answers
Ensuring new files in a directory belong to the group
I want to create a shared directory when a number of users (all belong to say mygroup) can create and edit files. I would like all files in this directory and subdirectory to belong to mygroup
I have changed existing files to have group mygroup…
justintime
- 3,361
90
votes
2 answers
How to tar a directory preserving not only permissions, but ownership too
I have to compress a directory using tar.gz preserving not only permissions, but ownership/groups too.
And, in this directory there are many files that belong to many users.
Paulo Coghi
- 1,264
87
votes
9 answers
Ansible: How to recursively set directory and file permissions
In ansible, I can do this:
file: dest=/foo/bar/somedir owner=root group=apache mode=0775 recurse=yes
And it recursively sets the owner, group, and permissions to 0775 on all directories and files in that path. But I want to set directories to 0775,…
Edward Ned Harvey
- 1,470
74
votes
5 answers
Windows: List files and their permissions (access) in command line
In linux, ls -l lists files permissions, like this:
-rw-r--r-- 1 user user 924 2011-07-01 20:23 test.txt
In Windows, commands tree and dir don't have the options to list permissions. How is it possible to list files and their permissions…
user89272
51
votes
4 answers
Reset file and folder permissions of external hard drive data to default in Windows 7
I have an external hard drive, changed some security settings of files, and now I am not able to access them in my other system. I am an admin in this system. Is there any tool that can reset all of the security settings of all contents to default?
Noman
- 613
42
votes
5 answers
SSH: "Permissions 0644 for 'my_key.pub' are too open."
Why is 0644 i.e. -rw-r--r-- too open for a SSH key? Also I could not find any false permissions on the .ssh directory (0700) or the home directory (0731).
Btw I'm getting this error when testing the paraphrase of a key via ssh-keygen -y -f…
user2820379
- 610
42
votes
3 answers
How do I force group and permissions for created files inside a specific directory?
For files created from the testuser account in the /var/www directory, I need they have g+rwx as permissions, and www-data as group.
How can I achieve this?
I'm creating the files via SSH.
Mr.Gando
- 597
42
votes
5 answers
Linux – cannot remove owned file with 777 permissions
I've couple of files that I cannot remove using rf -Rf command. I'm the owner of those file and the group assigned to those files is also a group my user is in. What's even weirder is that I can edit their content and I can change the permissions…
RaYell
- 1,164
40
votes
2 answers
How to prevent USB from .fseventsd, .Trashes, .Spotlight-V100 folders and .DS_Store files?
If you give somebody your USB drive to put files on it, it is so annoying to clean up afterwards, all these useless for other than OSX platforms artifacts, which pollute the disk. Is it any solution to prevent this behavior. Maybe to write those…
static
- 1,427
- 5
- 20
- 31
39
votes
1 answer
How to remove Quarantine from file permissions in OS X
I downloaded a .pem file and my Mac OS X (10.8.2) added an @ sign at the end of the file permissions. This is causing file permission issues.
I can't seem to remove the quarantine flag. I even tried the command
xattr -d .pem
but that…
Arunabh Das
- 911
- 1
- 12
- 18
37
votes
2 answers
How come one user can delete another user's 755 files?
I have a backup upload script that scp’s files to another server using the user upload. Another script on the target server then chown’s these to another user and sets the file mode to 755.
If I then SSH into the target server using the upload user,…
Maciej Swic
- 820