Questions tagged [permissions]
Access and restrictions of files, documents, accounts, computers, etc.
4,327
questions
781
votes
10
answers
637k
views
How to recursively chmod all directories except files?
How to chmod 755 all directories but not files (recursively)?
Inversely, how to chmod only files (recursively) but no directories?
646
votes
7
answers
926k
views
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 ...
574
votes
16
answers
489k
views
Reload a Linux user's group assignments without logging out
When assigning a user's secondary group list using:
# usermod -G <grouplist> <user>
is it possible to force this group assignment to take effect without logging out all running sessions?
...
469
votes
18
answers
880k
views
Windows SSH: Permissions for 'private-key' are too open
I've OpenSSH 7.6 installed in Windows 7 for testing purposes. SSH client & server work just fine till I tried to access one of my AWS EC2 box from this windows.
It seems like I need to change the ...
401
votes
7
answers
1.0m
views
How can I make chown work recursively?
I've got a directory called pdfs that contains a bunch of sub- and sub-sub-directories. I want to change ownership on all PDF files in all of the subfolders. I just tried this:
chown -R someuser:...
247
votes
9
answers
872k
views
How can I give write-access of a folder to all users in linux?
I installed apache2 on Ubuntu just now, and noticed that the /var/www folder is protected. I can just sudo everything but I would rather just give it write access.
How can I do this?
I tried sudo ...
137
votes
6
answers
144k
views
What should I do about com.apple.quarantine?
I've downloaded some .jar files from the internet and want to use them under Mac OS X. But the OS seems to have tagged them with the extended attribute com.apple.quarantine (no indication of this ...
135
votes
3
answers
254k
views
What is the "wheel" user in macOS/OS X?
I recently reinstalled iTunes and I noticed something peculiar.
The original version of iTunes has a user in the permissions known as wheel that is set to "Read Only".
I dragged this version ...
134
votes
4
answers
155k
views
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 ...
130
votes
9
answers
211k
views
How do I add a user to multiple groups in Ubuntu?
What's the command line utility and the arguments it requires?
129
votes
5
answers
150k
views
What does the dot mean at the end of `-rw-r--r--`? How do you set it with `chmod`?
Some of the files in my directories under Linux have a . at the end of the permissions listing.
What does the dot mean at the end of -rw-r--r--?
How do you set it with chmod?
114
votes
14
answers
258k
views
How can I always run the command prompt as administrator?
As a developer, I often have the need to open a command prompt for various purposes. For example, I use iisreset to restart my local web server.
I typically open the command window in one of two ways:...
110
votes
6
answers
124k
views
recursively change owner windows 7
Somehow I accidentally set all the files in a subfolder to "No Owner' and I can't seem to change all the permissions. I can change one by hand by changing the owner then setting permissions but how ...
102
votes
8
answers
62k
views
What does the @ mean on the output of "ls" on OS X' terminal?
When doing an ls in a directory I get the following output:
drwxr-xr-x@ 12 xonic staff 408 22 Jun 19:00 .
drwxr-xr-x 9 xonic staff 306 22 Jun 19:42 ..
-rwxrwxrwx@ 1 xonic staff 6148 25 ...
91
votes
4
answers
158k
views
How to make new file permission inherit from the parent directory?
I have a directory called data. Then I am running a script under the user id 'robot'. robot writes to the data directory and update files inside. The idea is data is open for both me and robot to ...
89
votes
3
answers
260k
views
How do I list the groups that a UNIX user is a member of?
With pts m groupname I can list the users in a group. How can I do the opposite - that is, list all the groups that a user is a member of?
(I need this to find the name of a group that I know a user ...
88
votes
2
answers
267k
views
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.
85
votes
4
answers
219k
views
Using vim to force edit a file when you opened without permissions
I use vim to edit a file. Sometimes, I forget to have the appropriate permissions. I run vim and the file as a read only file. I can make changes, but I can't actually write the changes. Every once in ...
84
votes
4
answers
263k
views
Create an SSH user who only has permission to access specific folders
I installed SSH, but I found if I use my original account to login to Ubuntu, it has too many permissions.
I want to constrain the user to only have permissions for specific folders in Ubuntu. How ...
83
votes
8
answers
428k
views
Modify fstab entry so all users can Read and Write to an EXT4 Volume
I have an Ubuntu 10.04 box with an EXT4 partition. This partition is set to automatically mount in /etc/fstab. For the purposes of this post, we'll call it: /media/foo.
Unfortunately, only root ...
82
votes
5
answers
239k
views
How to recursively change sharing/permission of a folder in Mac OS X
Is there any Mac OS X tools or scripts which allow me to change sharing/permission properties of files and subfolders in a folder recursively? For example, to let everybody or a specific user able to ...
81
votes
4
answers
223k
views
How to run a cron job as a specific user?
I would like to run a cron job as a specific user on my machine. How may I specify the user for a cron job to run as?.
The cron jobs will be running on a server (running on Ubuntu 10.0.4). The 'users'...
78
votes
3
answers
594k
views
Chmod to allow read and write permissions for directory
I have created directories in root. I am looking for the chmod command to allow all users read and write permissions to a specific directory. I have done chmod 775 for a file but I need this for a ...
73
votes
4
answers
47k
views
What are the correct permissions for the .gnupg enclosing folder? gpg: WARNING: unsafe enclosing directory permissions on configuration file
I don't want to just chmod and run until I get the right answer, nor do I want to run GnuPG as root. The easy fix would be to just set it so that only my user can read it, but I don't think that's the ...
70
votes
1
answer
56k
views
What is the difference between the default groups on Mac OS X?
Two questions:
What's the difference between the groups "wheel", "staff", and "admin"? What do they do?
specific use case: I'm trying to setup a local CVS repository as stated in the Apple webpage so ...
70
votes
2
answers
54k
views
Permission to make symbolic links in Windows 7?
How can I grant a particular user the permission to create symlinks in Windows 7?
I've searched through "Group Policy" and Google, but haven't found anything.
On a side note, is there a way to ...
68
votes
2
answers
166k
views
How to recursively set owner or permissions to 'everyone' for all folders and files?
I have an external hard drive attached, and I need to set permissions to be 'free' for the user MyUser.
I think I need to set the owner to MyUser also.
How can I do this via terminal?
67
votes
5
answers
215k
views
How do I get permissions to delete files on Windows 7?
I updated my laptop's OS from Windows XP to Windows 7. There are some leftover files from Windows XP on the computer now. If I try deleting them I get the following error:
You need permission to ...
64
votes
9
answers
247k
views
Delete old windows / program files from second drive?
My PC has a bunch of extra drives. Most of them contain old copies of Windows and Program Files. My PC is called "PC", and my admin user is called "Tim". I've assigned ownership of these second drives ...
64
votes
7
answers
92k
views
File I can't take ownership of
I downloaded a file from the internet (I can link to it here, but in the interests of not annoying other users, I won't post the link), and I can't delete the file with the message:
You need ...
61
votes
8
answers
123k
views
Change permissions upon uploading with scp
I am uploading files to my shell account using scp. As I need different permissions on the server than on my computer, I'd like to have a way to easily change the permissions upon upload without ...
61
votes
5
answers
552k
views
SSH permission denied on correct password authentication
I could successfully SSH into my machine yesterday with the exact same credentials I am using today. The machine is running CentOS 6.3. But now for some reason it is giving me permission denied.
Here ...
55
votes
6
answers
65k
views
Permissionless external drive with NTFS
I have an external hard disk which has 1 partition, formatted in NTFS. I use this drive on multiple computers with a different logins on different machines, Windows XP and Windows 7. All files are ...
53
votes
1
answer
13k
views
If a Chrome Extension is installed but turned off, can it still spy on me?
Say a Chrome extension is turned off and has the permissions: "Read and change all your data on the websites you visit" and "Read your browsing history", or other similar tracking permissions.
Can ...
52
votes
3
answers
7k
views
Do I really need recursive chmod to restrict access to a folder?
If I want to restrict access to a folder secret on a shared machine, do I really need recursive chmod on the folder
chmod -R g=,o= secret
or is chmod on the folder sufficient?
chmod g=,o= secret
...
49
votes
4
answers
87k
views
Find all files on server with 777 permissions
I'm looking for a Linux command to go through all the directories on my server and find all files with 777 permission. The output would be a list of all those files with full path.
49
votes
8
answers
214k
views
Using custom fonts without administrator rights?
I know you can put custom fonts in say C:\Windows\Fonts and applications will be able to find and use them. However this is only possible when you have administrator access to the machine, which is ...
49
votes
3
answers
235k
views
How to set file permissions so that new files inherit same permissions? [duplicate]
I have a folder in which new subfolders and files will be created automatically, by a script.
I want to maintain the user and group permissions recursively for all new folders and files placed in the ...
48
votes
4
answers
69k
views
Recursively chown all files that are owned by a specific user
Is it possible to find and chown all files that a specific user owns? I did a bunch of things as the wrong user and need to give the correct user ownership of the files.
Is there a recursive and ...
48
votes
2
answers
176k
views
How to specify group with 'chmod'
I was asked to add group-wrx permissions to a directory in another user's home folder.
I believe I should run chmod 771 -R directoryname in the parent directory. I can't find how to specify which ...
46
votes
2
answers
135k
views
Allow specific user permission to read/write my folder
I have a folder /home/samantha/folder that I want to share with the user tom. He can read/write the folder. How do I do that?
chown wouldn't do it because I still want to be able to be the owner of ...
44
votes
4
answers
48k
views
What does the "execute" permission do?
I am shocked that I still don't understand "Execute" permission in Linux.
There are three permission - read, write, and execute. I understand that read and write literally, but what does execute do ...
40
votes
5
answers
74k
views
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 ...
39
votes
5
answers
59k
views
How solve permission problems for docker in ubuntu?
I have installed docker as described here. I use Ubuntu Trusty 14.04 (LTS) (64-bit). Everything during installation was well. Also command $ sudo docker run -i -t ubuntu /bin/bash completes well (...
39
votes
3
answers
154k
views
Creating files and directories with a certain owner (user/group) while sudoing
I need to wget something (results in a compressed file in cwd), then I have to extract it, then do some copy/move/modification stuff and perhaps finally execute an script (from the downloaded archive)....
38
votes
8
answers
59k
views
rsync file permissions on windows
I have an rsync service that syncs files from remote machine to a machine that drops them on a network drive.
I need the copied files to take on the native permissions of the destination folder.
...
36
votes
4
answers
36k
views
removing write permission does not prevent root from writing to the file
I just noticed on my Ubuntu machine (ext3 filesystem) that removing write permissions from a file does not keep root from writing to it.
Is this a general rule of UNIX file permissions? Or specific ...
36
votes
8
answers
258k
views
Access denied even though I'm an Administrator?
My user account on Windows 7 is part of the Administrators group which has a full control permissions on C:\inetpub\wwwroot:
However, when I try to create a folder in it, I get the "access denied" ...
36
votes
2
answers
50k
views
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 ...
35
votes
3
answers
38k
views
Recursive chmod: rw for files, rwx for directories
I want to chmod a lot of files and directories. As x indicates list for directories and execute for regular files I'd like to apply rw for files and rwx for directories. Is it possible using only the ...