Permissions are the unix way of controlling access to resources such as files, directories and devices and may be specified for an owner, group, or all users.

learn more… | top users | synonyms (1)

4
votes
3answers
2k views

granting write permissions to a group to a folder

How can I grant write permission to 1 group ? I have 2 users (alex and ben). alex is member of group alex and of group consult. ben is member of group ben and of group consult. I want to grant read ...
4
votes
3answers
1k views

Permissions issues for shared directory on a server

The setup is we have a VPS running Debian Squeeze, and I've set up a shared directory for us to share files. So far I've followed this guide: ...
2
votes
4answers
328 views

USB 500GB external drive mounted with undetermined permissions, missing data

Note: This situation is evolving. Please see the output at the end of this question for the current situation. I'm using Linux Mint 14. Recently, I repartitioned one of my hard drives, and I backed ...
2
votes
2answers
10k views

Mount device with r/w access to specific user

How can I mount some device with read-write access to specific user?
0
votes
2answers
266 views

setfacl access issues

I have a list of users (user1,user2,user3,superuser). user1, user2 and user3 belong to a usergroup called normalusers . Now, I need to issue the access control list command for the user superuser to ...
6
votes
1answer
3k views

Why can't sudo redirect stdout to /etc/file, but sudo 'nano' or 'cp' can?

Why does redirection, using sudo give me an error for the following commands? $ sudo printf "foo" >/etc/file bash: /etc/file: Permission denied $ sudo printf "foo" ~/file; cat ~file ...
5
votes
2answers
6k views

Using setfacl to allow group members to write to any file in a directory

I'd like to use setfacl so that anyone in group 'app' can edit any file contained within /usr/local/users/app regardless of what the traditional UNIX permissions say. I have two users john and ben. I ...
3
votes
2answers
168 views

How does the 'passwd' command gain root user permissions?

How does Linux know that it has to give euid 0 (uid of root) to only certain process like passwd, setuid, etc. If a process can gain root permissions, will it not lead to potential security breaches ...
3
votes
1answer
1k views

Can't rename a directory that I own

I have a directory with a big load of sub directories. I own all of them, and the permissions are all 777. pascal@azazel /box $ ls -al total 147872 drwxr-xr-x 293 root root 12288 aoû 22 19:44 ...
3
votes
3answers
6k views

How to check which Apache group I can use for the web server to write?

I'm trying to make Wordpress work. I currently have this error message: Could not create directory. /var/www/html/wp-content/upgrade/theme_name when trying to upload a theme. This is the ...
2
votes
4answers
390 views

Strange file ownership with Ubuntu

Normally we know when we create one file in Linux, the file's owner and group will set with the creator. For example, I have one user, usera, after I execute usera@srv1:$touch 1.txt I will find the ...
2
votes
2answers
2k views

can't change file permission

Whenever I create or copy few shell files to usb storage device, then I am not able to make them executable. If I create test.sh, it's default file permission will be 644, but when I execute ...
2
votes
2answers
807 views

Mount permissions always blocked

How do I authorise my non-root user to manually mount/unmount ALL media on my desktop. I always get denied permission. Media refers to all mountable USB devices and other partitions on my HDD as ...
2
votes
1answer
644 views

pure-ftpd permission denied on external usb drive

I have a sheevaplug PC (Debian installed) that I'm trying to setup my personal FTP server with. So far I was able to set up auto mounting and installed pure-ftpd. I currently have autofs setup to ...
1
vote
2answers
1k views

newgrp and groups assigned via pam_group.so

For convenience reasons I tend to assign special group memberships like floppy, audio, plugdev, video etc. via /etc/security/group.conf (pam_group.so) mechanism instead of adding all users to this ...
0
votes
2answers
120 views

File permissions of file when tranferring from Windows to Unix

When I am uploading a file from windows PC to Unix ,the permissions of file are --wxr----t on unix machine , whereas umask is 0022 .I am not able to understand from where is the file getting ...
59
votes
6answers
105k views

How do I copy a folder keeping owners and permissions intact?

So I was going to back up my home folder by copying it to an external drive as follows: sudo cp -r /home/my_home /media/backup/my_home With the result that all folders on the external drives are ...
15
votes
3answers
4k views

How to “jail” a process without being root?

Were I root, I could simply create a dummy user/group, set file permissions accordingly and execute the process as that user. However I am not, so is there any way to achieve this without being root?
21
votes
4answers
1k views

Is there a reason why 'owner' permissions exist? Aren't group permissions enough?

I think I rather understand how file permissions work in linux. However, I don't really understand why they are split into three levels and not into two. I'd like the following issues answered: Is ...
7
votes
2answers
734 views

How are file permissions calculated?

Using chmod I could set the permissions for a file, but if the parent ( .. ) directory had conflicting permissions, what would happen? And if I create a new file, using touch or something similiar, ...
20
votes
2answers
2k views

How do I make a file NOT modifiable?

While logged in, I can do the following: mkdir foo touch foo/bar chmod 400 foo/bar chmod 500 foo Then I can open vim (not as root), edit bar, force a write with w!, and the file is modified! How ...
10
votes
4answers
2k views

Which is more widely used: chmod 777 or chmod a+rwx [closed]

Out of the two options to change permissions: chmod 777 file.txt chmod a+rwx file.txt I am writing a document to send out to our customers, detailing that they need to change the file permissions ...
9
votes
5answers
28k views

“Symbolic link not allowed or link target not accessible” / Apache on CentOS 6

I've got a brand new CentOS 6 installation, which has a symlink in the document root to my development files: [root@localhost html]# ls -l total 4 -rwxrwxrwx. 1 root root 0 Sep 18 20:16 index.html ...
6
votes
5answers
940 views

Making a directory protected from 'rm -rf'

I just lost some data in folder A which was inside folder B after doing rm -rf B. Before I could realize what have I done, it was all over. Now a lesson is learnt, I wish to make some of my folder ...
9
votes
5answers
3k views

Directory with +x permission, parents without it. When would this be useful?

Say I have a folder called folder in the following path: my_path = /a/b/c/d/e/folder and a file called file in that folder. Then, say I run this command to remove group permissions under /a/ > ...
9
votes
4answers
37k views

VSFTPD, 553 Could not create file. - permissions?

I've set up VSFTPD on Amazon EC2, with the Amazon Linux AMI. I created a user and can now succesfully connect via ftp. However, if I try to upload something I get the error message "553 Could not ...
7
votes
2answers
3k views

Can files be created with permissions set on the command line?

When creating directories, mkdir -m <mode> <dir> provides for creating one or more directories with the given mode/permissions set (atomically). Is there an equivalent for creating files, ...
7
votes
3answers
6k views

bash: /dev/stderr: Permission denied

After upgrading to a new release version, my bash scripts start spitting errors: bash: /dev/stderr: Permission denied in previous versions Bash would internally recognize those file names (which is ...
6
votes
2answers
7k views

Make all files under a directory read-only without changing permissions?

First, some background: /dev/md1 is a RAID-0 array serving as primary file store. It is mounted to /var/smb. /dev/md2 is another RAID-0 array storing backup snapshots taken from /dev/md1. It is ...
5
votes
4answers
7k views

How to restore default group/user ownership of all files under /var?

I accidentally changed /var owner/group to my username and then changed it back to root, but not all the /var folders' owners are root, so is there anyway to change back owner/group of files/folders ...
2
votes
1answer
3k views

How to mount USB stick on Debian Sid?

I've just installed Debian Sid on my computer but I cannot mount external USB drives as you can see in the image. Mounting failed Cannot mount "SENZATITOLO" Not authorized What should I ...
2
votes
2answers
899 views

setuid and setgid confusion

I'm trying to fully grasp the concept of setuid and setgid, and I'm not quite sure in what way permissions are actually elevated. Let me provide an example: Users userA (groups: userA groupA) userB ...
2
votes
1answer
948 views

How do I restore default owner of files in /var/ directory?

Accidentally in /var/ directory I ran chown root . -R;chgrp root . -R. Now services like mysql don't start. Is there a way to restore default owner and groups? If there is no way, what is the default ...
12
votes
1answer
10k views

Unable to delete file, even when running as root

I am in the process of migrating a machine from RHEL 4 to 5. Rather than actually do an upgrade we have created a new VM (both machines are in a cloud) and I am in the process of copying across data ...
8
votes
1answer
5k views

Why does root get Permission denied when accessing FUSE directory?

I use a FUSE filesystem with no problems as my own user, but root can't access my FUSE mounts. Instead, any command gives Permission denied. How can I give root the permission to read these mounts? ...
8
votes
5answers
27k views

Problem to launch java at Debian: “error while loading shared libraries: libjli.so”

I'm trying to launch java: $ java -version java: error while loading shared libraries: libjli.so: cannot open shared object file: No such file or directory $ ldd ...
8
votes
2answers
4k views

I can't delete a file that I have write permissions for as a group member

$ touch testfile $ chmod g+w testfile $ sudo adduser user2 user1 $ stat -c'%a %A' testfile 664 -rw-rw-r-- $ su user2 Password: $ groups user2 user1 $ rm testfile rm: cannot remove `testfile': ...
8
votes
2answers
324 views

How is file ownership affected across different systems?

As I understand Unix file systems, any file on a unix system must belong to a group and a user of the said system. A file cannot belong to a group or user that does not exist on the system. From that ...
6
votes
1answer
1k views

Is it possible to disable file permissions on a ext3 or ext4 file-system?

Is it possible to disable file permissions on an ext3/4 file-system? Just wondering if it's possible to completely disable or ignore file permissions on a ext3 or ext4 file system. Perhaps a mounting ...
6
votes
3answers
4k views

How to revert chown command?

If I run: sudo chown -R user:user / Can I revert it to what it was before I ran it?
4
votes
2answers
756 views

encfs with expect access denied

If I execute script #!/usr/bin/expect set pass [lindex $argv 0] spawn encfs -v {CRIPT_DIR} {MNT_DIR} -o nonempty expect "*EncFS Password:*" send "$pass\r" expect eof expect script output: ...
3
votes
2answers
180 views

Exclude paths that make find complain about permissions

I need to generate a file list from a disk volume. Some of the directories (all hidden directories under the root directory) have strange permissions that causes find to complain. I try to exclude ...
3
votes
1answer
157 views

How to create a user with minimalistic permissions on OpenBSD?

I want to run the webbrowser (xxxterm) with a different user (XY) on an OpenBSD Desktop (different user from the one I use daily). I will reach the Browser with ssh -X in the local machine (or are ...
3
votes
2answers
138 views

how to initialize `/etc/group`?

After editing /etc/group, How this update starts functioning without restarting the system in Unix? Is there any command we need to run?
3
votes
4answers
3k views

Permissions to deny SSH users from accessing other user's folders

I am currently running Fedora on a network computer, acting as a host to other users who will SSH into my terminal to do their work. However I realised that they are also able to access my /home ...
3
votes
3answers
201 views

Permissions for a submission script

I'm a TA for an introductory Python programming class (all work is done from the terminal), and I'm writing a project submission script. Ideally I want a directory setup like this: submissions/ ...
3
votes
2answers
366 views

Permissions of webserver's root directory

I've had this issue on several setups, and I'm unsure of how to handle it. At first, all of /var is owned by root:root. Clearly I don't want the web directory to be owned by root, so I do chown ...
2
votes
1answer
2k views

NAS box mounted via CIFS - problem with permissions

I'm running the latest version of Ubuntu, and have mounted a SMB share via a line in rc.local. The share mounts correctly, and I can browse files freely, create new files, and then delete them ...
2
votes
1answer
640 views

How to assign correct permissions to both webserver and svn?

I've an issue with files ownerships in unix. I have a drupal website and the "files" folder needs to be owned by "www-data" in order to let the users to upload files with php. However I'm now using ...
1
vote
3answers
1k views

Run Linux “motion” app as user

I'm trying to run Motion app on a Linux box. For various security reasons, I'd rather run it as regular user than sudo. However, when I run "service motion start" without the sudo in front, it says: ...