Questions tagged [file-permissions]

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.

1303 questions
610
votes
8 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
131
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…
n0pe
  • 16,472
  • 18
  • 71
  • 102
100
votes
7 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,173
  • 5
  • 22
  • 22
97
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,357
  • 3
  • 17
  • 23
88
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,201
  • 5
  • 29
  • 33
84
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,420
  • 2
  • 12
  • 14
83
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,174
  • 1
  • 11
  • 14
50
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
  • 603
  • 1
  • 6
  • 6
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,134
  • 1
  • 12
  • 17
39
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
  • 580
  • 1
  • 4
  • 11
38
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
  • 557
  • 2
  • 7
  • 10
36
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
  • 800
  • 2
  • 11
  • 24
36
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,337
  • 5
  • 18
  • 29
35
votes
6 answers

Why can't I delete a file where I have group write permissions on?

I have a file with the following permissions: root:data, and chmod set to 775. My normal user, let's call him boby, is in the data group. Why can't I delete the file with the user boby? rwxrwxr-x 18 root data 4096 2011-12-30 22:02 storage my…
johnlemon
  • 7,233
  • 3
  • 18
  • 16
34
votes
2 answers

How much can we rely on filesystem permissions for security?

My question is about filesystem permissions (specifically the Unix style permissions) and how they relate to security. Say I have access to a computer with a guest user account and a user named Bob. I don’t know Bob's password, but I can use the…
bob
  • 443
  • 4
  • 7
1
2 3
86 87