Access and restrictions of files, documents, accounts, computers, etc.

learn more… | top users | synonyms

15
votes
3answers
9k views

Can't execute a script on a mounted external drive

The /mnt/ext is mounted to an ext2 filesystem, an external hard drive. For some reason I can't run scripts from there. Please see the session below. luntain@plato /mnt/ext $ echo "echo success" > ...
15
votes
2answers
26k views

How does the “Full Control” permission differ from manually giving all other permissions?

On Windows Server 2003 - and some other versions of Windows - the Properties > Security tab of a folder's or file's context menu provides "Allow" and "Deny" options for "Full Control," "Modify," "Read"...
15
votes
4answers
46k views

How to prevent a file from accessing the internet?

There are some .exe and .dll files belonging to some programs on my laptop which communicate with the internet without my permission (for self-update generally). I want to prevent those files one by ...
14
votes
2answers
10k views

How to make files created in a directory owned by directory group?

Is there a way, on Linux, to cause all new files created in a directory to be owned by the directory's group instead of the creating user's group?
14
votes
2answers
14k views

Unix: Is there a way to “copy” file or directory permissions?

I have two files in a directory. One has correct permissions and the other has not. Is there a way I can "copy" the set of permissions from one file to another?
14
votes
1answer
9k views

Why can't I chown a VirtualBox shared folder?

I'm trying to recursively chown a VirtualBox shared folder, but I can't get it to work: $ ls -lah total 16K drwxr-xr-x 4 root root 4.0K Aug 1 2012 . drwxr-xr-x 23 root root 4.0K Jul 21 2012 .....
14
votes
2answers
14k views

How to bind old user's SID to new user to remain NTFS file ownership and permissions after freshly reinstall of Windows?

Each time we reinstalled Windows, it will create a new SID for user even the username is as same as before. // example (not real SID format, just show the problem) user SID -------------------- ...
14
votes
5answers
24k views

How to set default permissions for automounted FAT drives in Ubuntu 9.10?

I've got many FAT32 drives that I'd like to mount in Ubuntu such that they have permission mode 700 for directories and 600 for all other files. By default, they have 755 for all files, which is not ...
14
votes
2answers
2k views

Match Windows 7 default permissions to Cygwin created file defaults

I am using cygwin on Windows 7 professional. When I create new files such as MyNewFile.java it seems to get default permission set to 755. This is not what I want. I want it to be 644 for regular ...
13
votes
1answer
12k 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 (...
13
votes
6answers
30k views

How to reset folder permissions to their default in Ubuntu?

I recently typed the command sudo chmod 777 -R / after that some things like sudo -i are not working normally. So I am wondering if there is any way I could reset the folder permissions to their ...
12
votes
5answers
166k views

How do I get permissions to save in a folder that Windows 7 denies me from?

I'm getting this message - You don't have permissions to save in this folder - even though I am the only user on this machine, and administrator. How can I set permissions for myself to do everything,...
12
votes
4answers
9k views

Linux Group Permissions not being enforced correctly.

I am running Ubuntu 10.04 server and am having some very counter-intuitive experiences with users/groups. For example: sudo touch test_file # create empty file sudo groupadd test ...
12
votes
2answers
837 views

Difference when using backticks in double quotes and single quotes in Bash

Why to the following two executions differ in output? (I need double quotes for variables in my eventual command) $ sudo su -c "echo `cat /root/root_file`" cat: /root/root_file: Permission denied $ ...
12
votes
1answer
31k 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?
12
votes
3answers
15k 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 ...
12
votes
2answers
381 views

Is it possible to discover the current owner of a folder?

I am running the Windows 8 Enterprise x64. Here are the current security settings for a folder on an NTFS volume: I have access neither to the folder contents, nor to its security settings nor its ...
11
votes
3answers
14k 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 ...
11
votes
1answer
10k views

Linux - group member cannot delete file with rw permission

Below shows a file, /tmp/testfile, owned by user1 with group changed to wheel that also includes user2. The file has rw permission for the group. So shouldn't any member of the group be able to delete ...
11
votes
2answers
17k views

How can I setup a group writeable directory?

$ whoami meder $ cd /var/www $ sudo mkdir html $ sudo groupadd web $ sudo usermod -a -G web meder $ sudo usermod -a -G web medertest $ sudo chown meder:web html $ sudo chmod -R g+rwx html The ...
11
votes
3answers
36k views

PHP script can't run bash script. sh: Permission denied

I'm trying to exec a .sh script from PHP, however it is not executing. I checked the error logs, and I'm getting the 'sh: Permission denied' error. I checked under which user php is being run, and ...
11
votes
1answer
3k views

How do I find all files that are *not* group writeable?

I see the following question describing how to find group writeable files: How can I find all PHP files with group write permissions? But I want files that are not group writable! (Also, I couldn't ...
11
votes
5answers
19k views

Unable to delete a file or take ownership on Win7x64

I'm a developer and as part of the build process, a Microsoft dll is copied to a certain folder. That file copy is now failing as the target can't be overwritten. I decided to delete it by hand (...
11
votes
2answers
17k views

Setting differing ACLs on directories and files

Quick ACL question: I want to set up default permissions for a file share so that everyone can rwx all of the directories and so that all newly created files are rw. Everyone who is accessing this ...
11
votes
4answers
51k views

Access to CD/DVD Drive is Denied through Windows 7 Explorer (Permission Problem)

A while ago I started having trouble with my optical drives. Both of them keep showing up in Explorer as CD/DVD drives on boot, but as soon as I put a disc in either one, it suddenly turns into a hard-...
11
votes
2answers
6k views

Homebrew won't link git

When I installed git or upgrade git via brew I couldn't link it with brew link git. If I try sudo brew link git I get: cowardly refusing to sudo brew link It says that I have to check the ...
10
votes
1answer
95k views

Granting write permissions to www-data group

I am creating a website and part of the function is to write out user generated data with php. I'm using nginx on Ubuntu 13.04. A the moment I'm only testing and everything is served through nginx on ...
10
votes
3answers
25k 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 ...
10
votes
2answers
41k 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 what I should do is run chmod 771 -R directoryname in the parent directory. What I can't find ...
10
votes
3answers
1k views

How to make a file editable by two different users in different groups?

I have a folder at /home/www/, and the owner is www, which is part of the www-group. I have another user, john, part of the john group. How can I chown /home/www/ to make it writable by both www and ...
10
votes
3answers
14k views

Unzipping file whilst getting correct permissions?

I unzipped a file on my server using: unzip filename However this seems to have caused all the files having owner/group permissions of 0 0. The files I uploaded were a PHP software script, so I'm ...
10
votes
6answers
89k views

Change Windows 7 file permissions from command prompt

How can I change Windows 7 file permissions using the command prompt? I want to change permissions in program files, but cacls is not working for me.
10
votes
2answers
2k views

Logrotate no longer reads symlinked configuration file due to non-root ownership

We are currently upgrading from Ubuntu 12.04 LTS to 14.04 LTS on our ruby on rails application servers, and have noticed that the log files are no longer rotating. On both machines we have a file /...
9
votes
11answers
3k views

Unix: How can I allow only one person to see my folder in the same fs?

I want to give an access to a dir for a friend. He has the access to the file system, where the dir is located. I don't want to set the permissions to all users. How can I allow only a person to see ...
9
votes
8answers
46k views

How do I retrieve files from Time Machine backups from another computer?

Really it's the same computer - I just did a fresh install of Snow Leopard. When I try to open the Documents directory from my old user account I get The folder "Documents" can't be opened because ...
9
votes
5answers
6k views

How do I tell sudo to write files with a umask of 0022?

I recently upgrading to Snow Leopard. I have noticed that some files written by MacPorts are installed with the wrong permission -- they are written with a umask of 0077. I think I have narrowed down ...
9
votes
2answers
5k views

cannot access /dev/null: Permission denied, although crw-rw-rw- 1 root root 1, 3 Sep 21 12:05 /dev/null

On user postgres: $ ls -l /dev/null ls: cannot access /dev/null: Permission denied Thought on user root, permissions are correct: # ls -l /dev/null crw-rw-rw- 1 root root 1, 3 Sep 21 12:05 /dev/...
9
votes
3answers
11k views

What is the meaning of 'T' in the execution permissions of a directory?

I just found this confusing output of the ls command: whodare@ubuntu~ $: ls -l /var/spool/cron/ total 12 drwxrwx--T 2 daemon daemon 4096 Oct 29 05:02 atjobs drwxrwx--T 2 daemon ...
9
votes
2answers
24k views

rsync set group owner, group permission

I want to use rsync to transfer files from my computer to a remote Linux system. Regardless of the local file's group ownership, I want to set these values on the remote side. If I was on the remote ...
9
votes
2answers
6k views

NTFS Permissions - SYSTEM

Are there any possible side effects to removing permissions for SYSTEM on an NTFS directory? It is a non-system (user documents) folder. I know the obvious (i.e., that SYSTEM will no longer to be able ...
9
votes
6answers
19k views

What is different between root and sudo?

A root user can have all the privileges. But a normal user can gain access like a root with su or sudo command and their own password. So what's the difference?
9
votes
1answer
14k views

Transmission-daemon not picking up on watch directory

Trying to get my transmission-daemon to pick up files from a dropbox folder, to make remote starting easier (it's a headless system). As far as I can tell, the settings.json file is as expected, but ...
8
votes
3answers
2k views

Logged in to vi, made changes, forgot to sudo first - now what

I made lengthy changes to a configuration file on a Ubuntu Linux computer with the vi editor. Unfortunately, I forgot to sudo first, so now I'm in the editor, but can't save my changes because of ...
8
votes
4answers
30k views

Running Apache as a different user

When I run the ps -efH command to list out all the process, I can see Apache running as root and seems to have sub-processes running as www-data. Here's the excerpt: root 30117 1 0 09:10 ? ...
8
votes
4answers
58k views

Can't change permission/ownership/group of external hard drive on Ubuntu

I have an external hard drive connected to my Linux box. I wanted to setup a web server to access files on it, but the permission on all files and directories on the drive are rwx for the owner which ...
8
votes
2answers
16k views

Can't cd into my own directory?

On an EC2 instance I have changed Apache's log location to a different directory than the default. This is so that I can hold the logs on a (non-boot, only data) EBS. However, I can't cd into the ...
8
votes
4answers
2k views

How can Mac OS X save details about the URL from which a file has been downloaded?

WRT this topic What should I do about com.apple.quarantine? , I want to know how can OS X learn and save those information in the @ field. I'm not looking for a way to disable this feature, but for a ...
8
votes
2answers
749 views

How does an operating system prevent an unprivileged process from executing a privileged instruction?

In Unix, if you are a guest user and did: chmod 777 / It would fail. But how does this internally happen at the hardware level? So far, I think this is what happens: The OS tries to execute ...
8
votes
4answers
3k views

How can I recursively set read-only permissions?

I have a very large and deep directory. I would like to make all of it read only. The problem is I guess I have to distinguish between files (which will get a=r) and directories (which will get a=rx). ...
8
votes
3answers
2k views

Linux shutdown permission

Suppose you install a desktop environment, say ubuntu or debian. You can shutdown the system by clicking a button somewhere on your system menu as a normal user. You don't need to switch to superuser ...