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)

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 ...
8
votes
4answers
18k 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 ...
19
votes
2answers
1k 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 ...
8
votes
5answers
2k 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/ > ...
7
votes
2answers
2k 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, ...
5
votes
3answers
23k 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 ...
3
votes
4answers
2k views

Allow a user to read some other users' home directories

I am new to system administration and I have a permission related query. I have a group called administration. Inside the administration group, I have the users user1, user2, user3, superuser. All the ...
2
votes
2answers
397 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
3answers
2k views

read only access to all files in a specific sub-folder

I have got a specific folder located in "/home/.../reboot/". I have a series of users that require read-only access to the ever changing files within. My problem is that the same users are not ...
2
votes
1answer
789 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 ...
8
votes
2answers
300 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 ...
7
votes
1answer
5k 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 ...
7
votes
2answers
3k 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': ...
5
votes
1answer
4k 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? ...
3
votes
2answers
70 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
121 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
94 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

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 ...
3
votes
2answers
536 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
3answers
180 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
323 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
1k 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
599 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
1answer
126 views

Shared partition permission management

I am willing to try a dual boot arch/lmde setup on my laptop next week, but I've ran into a problem: I want to have a shared data storage where my downloads, documents etc would reside and could be ...
0
votes
2answers
92 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
6answers
145 views

File protection in Unix

Is there a way to protect a file in such a way that even root cannot delete it or rewrite it after creating it? I have a file which is created by root under /var/log/ and I want to restrict all users ...
6
votes
1answer
86 views

Cannot expand asterisk without proper permission

Can someone explain to me the following? $ ls -ld /temp/sit/build/ dr-xr-s--- 3 asdf qwer 4096 Jan 31 2012 /temp/sit/build/ $ ls -ld /temp/sit/build/* ls: /temp/sit/build/*: Permission denied So ...
6
votes
3answers
2k 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?
5
votes
2answers
371 views

How can I ensure only the root user have the right to halt/reboot the system?

CentOS Linux by default allows all users to have permission to "halt" & "reboot" the system by using the commands halt and reboot. How can I configure my system so that only the root user has the ...
5
votes
5answers
459 views

How to setup password-less ssh with RSA keys

I am trying to setup a password-less SSH configuration between two machines and am having trouble. There are a ton of howtos out there that I have followed and have had no success. Here are ...
5
votes
2answers
242 views

Is it possible to represent the +X symbolic permission with an octal value?

Is it possible to represent the +X symbolic permission with an octal value? The chmod(1) man page says: execute/search only if the file is a directory or already has execute permission for some ...
5
votes
3answers
1k views

Frustrating issue where neither cron nor su -c runs my job (permissions?)

Updated (and snipped) with more details below. I've set up a cron script and I'm trying to debug why it's not running. [Snipped context testing, which is all ok; see revision 2 for details] The ...
5
votes
2answers
1k views

recursively change file permission but not directories?

I was doing a mass recursive change of permissions of some files that I had migrated to a unix system. I changed them to ug+rw, but then I found that I could not traverse subdirectories. I looked at ...
5
votes
5answers
216 views

Changing Unix group for files

I have a file that a colleague and I are editing together, on a Unix system. We are using Unix group permissions to edit it. We have one Unix group that we are both members of. Whenever I save the ...
4
votes
1answer
824 views

How to configure permissions to allow apache to securely have access to a file in a shared environment?

This is a follow up question from my previous, but I felt it might be more Linux based. http://serverfault.com/questions/414207/how-to-set-linux-permissions-to-allow-apache-to-have-access-to-a-file ...
4
votes
2answers
16k views

Why do I get an “rsync: failed to set times on … : Operation not permitted (1)” error on Ubuntu 10.10 with SME Server 7.4? [duplicate]

I am trying to cron an rsync via ssh between two fileservers that are running SME Server 7.4 and Ubuntu 10.10, respectively. The first rsync worked just fine (for reasons that I do not know), but now, ...
3
votes
1answer
270 views

permission denied for ptrace under GDB

I initially posted this question on StackOverflow, as a GDB problem. I didn't find a solution there, but they did help me find that it's a permissions problem, so I'm posting it here. I have set a ...
3
votes
1answer
152 views

How are file permissions applied to newly created files?

I have a directory that has the following permissions set: drwxr-s---. user group folder On the desktop, I access this folder and right click to create a new file call foo.txt. Then using the ...
3
votes
2answers
405 views

How to set permissions in /sys/ permanent?

I'm starting X as a user and need to set my keyboard brightness in /sys/class/leds/asus\:\:kbd_backlight/brightness. The /sys/ directory gets recreated after reboot, so the permissions will reset too. ...
3
votes
2answers
551 views

A question about permissions of hierarchical directories

I have some directories, with following permissions: drwxr-xr-x 18 user1 root 4096 Oct 27 11:25 /home/test1/test2 drwxr-xr-x 24 user1 root 4096 Oct 21 08:38 /home/test1 drwxr-xr-x 492 root root 12288 ...
3
votes
3answers
274 views

Setting execution right to whole directory - is it good or bad idea?

I have a zip file containing lot of files and directories for a certain application which should be running on Linux. Some files needs to be set as executable, but the zip file format afaik does not ...
3
votes
2answers
844 views

What directories/file permissions should i ensure are set?

I have a similar question about default software configuration. For this question i would like to ask What directories/file permissions should i ensure are set? Aprrently Is it normal to get ...
2
votes
3answers
942 views

Allow a user to view the home directory of other users via sudo

I am new to system administration. We have a lab set up where we have a server and client machines. The client machines have LDAP users which has the work area for all the users in the centralized ...
2
votes
1answer
171 views

How do I grant someone else access to my linux server

If you administer a Linux server, what steps do you take to properly grant someone else access? Assuming they will log in over ssh, don't already have an account, and will need root access. ...
2
votes
2answers
2k views

CentOS - Issue with write permissions

I am running CentOS 6.4 and I have installed Wordpress on it. (along with LAMP) Now the problem is, that I cannot make any write changes to any files in the wordpress editor: eg. header.php, ...
2
votes
1answer
103 views

Adding a user to a group by default

I have a group that all users on the system share. The group name is common and it is to allow for a universal fileshare for everyone on the machine. How would I make it so that all new users are ...
2
votes
1answer
1k views

Why can't I use strace with rsh?

If I run rsh, it works, but prints some strange “Connection refused” messages at the beginning: $ rsh localhost pwd connect to address 127.0.0.1 port 544: Connection refused Trying krb4 rsh... ...
2
votes
3answers
271 views

How does gcc handle file permissions?

The executable files that gcc creates have execution permissions -rwxrwxr-x which are different than the permissions that the source file has. -rw-rw-r-- How does gcc set these permissions ?
2
votes
2answers
396 views

Gaining root privileges in SCO

I am learning Linux for work, so am still a bit rusty on the edges. I need to change the folder permission of the directory /opt, and I know in Linux, you do the following: chmod 775 /opt I get a ...
2
votes
2answers
4k views

Find web server group? Permissions problem

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 ...