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)

1
vote
1answer
1k views

simultaneously share /dev/videoX with multiple applications?

the goal is to use the same webcam for video chat apps and for home security at the same time. Currently, the webcam is working just fine with either VLC (or mjpg-streamer) and with Kopete - just not ...
1
vote
1answer
502 views

svn and webserver files ownerships

I've an issue with files ownerships. 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 svn and ...
2
votes
1answer
630 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
2answers
3k views

How to insert text into a root-owned file using sudo? [duplicate]

Possible Duplicate: Redirecting stdout to a file you don't have write permission on Running a command like sudo echo 'text' >> /file.txt fails with: bash: /file.txt: Permission ...
8
votes
2answers
313 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 ...
2
votes
1answer
606 views

immutable-like flag for perms

Is there any chattr flag that would allow me to lock a file's unix permissons, and not change them without resetting the flag? The file itself should still be modifiable, I just want to prevent ... ...
3
votes
1answer
2k views

what does the “a” in chattr +ia do?

what does the a in chattr +ia <filename> do? and why would you add the a in combination with the i? note: I know the i is for immutable
4
votes
1answer
231 views

What's the best way to configure shared filesystem directories? (beyond standard unix perms)

I have multiple users on my system. I'd like to have shared directories like music, video. pictures etc. The problems is that I want users to be able to write any new files to any directory, but not ...
4
votes
2answers
5k views

How to get a program running with root privileges without using su or sudo

I have a bash script that needs to run with root privileges, but must be invoked by the normal user. Difficult part is that the script should not ask for a password, and I don't want to use the ...
2
votes
2answers
415 views

Unix executable file permission vs runtime user's permissions

I have heard that it is good practice to run an executable as a user with a completely different privilege set than the owner of the task. In fact I heard that it is best to run it as a different user ...
7
votes
2answers
703 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, ...
9
votes
5answers
3k views

How to create a file even root user can't delete it

How to create a file even root user can't delete it ?
6
votes
1answer
2k views

how to view a directory's permission

What is the command with which you can directly view the permission bits of a directory?
2
votes
4answers
1k views

How do I force the user to become root

I have written a bash script for use on my ubuntu box. Now I would like to prevent running this script under my own user and only able to run it as root (sudo). Is there a possibility to force this. ...
2
votes
5answers
6k views

Create directory in /var/run/ at startup

I'm using apache2 and postgres running on Ubuntu Server 10.04. I have removed the startup scripts for both of these apps and I'm using supervisor to monitor and control them. The problem I have run ...
10
votes
1answer
979 views

Permission bits not being enforced on samba share

I have a problem where permission bits are not being enforced on a samba share using a Linux client. I have samba configured on the server to force a certain user, group and permission bits and this ...
43
votes
5answers
4k views

Redirecting stdout to a file you don't have write permission on

When you attempt to modify a file without having write permissions on it, you get an error: > touch /tmp/foo && sudo chown root /tmp/foo > echo test > /tmp/foo zsh: permission ...
14
votes
3answers
2k views

I accidentally chmod -R +x on a directory. How do I restore the correct permissions?

Well, to be specific, it was chmod -R 755. Now every file is executable, which I don't want. I am thinking that I should look at the first two bytes of each file for the #!, but will this cover ...
73
votes
1answer
80k views

How to set default file permissions for all folders/files in a directory?

I want to set a folder such that anything created within it (directories, files) inherit default permissions and group. Lets call the group "media". And also, the folders/files created within the ...
5
votes
2answers
295 views

What files in /var need to have specific owners?

I accidentally wreaked unknown amounts of havoc on my web server by running sudo chown -R myuser:mygroup * .* in /var/www, not remembering that .* would include the parent directory (as ..). I ...
8
votes
3answers
3k views

How to make a folder private?

I'm using Ubuntu with several users and I want to make folders viewable just for a specific user. Any idea how to do it?
5
votes
4answers
3k views

Downsides of umask 077?

What are the cons, for having a restrictive umask of 077? A lot of distros (I believe all, except Red Hat? ) have a default umask of 022, configured in /etc/profile. This seems way too insecure for a ...
2
votes
2answers
2k views

How to set up file permissions/ownership for FTP/Apache/PHP on CentOS

I have basic understanding of chmod and CentOS file permissions. 777 stands for 111111111 and rwx for each root, group, user, etc. What I can't get my head around is setting up Apache, FTP and PHP to ...
13
votes
7answers
8k views

What to use to backup files, preserving ACLs?

When using the tar utility to store files in backups one loses the extended ACLs. Is there some commonly used and not hackish solution (like: create a script that will recrate the ACLs from scratch) ...
6
votes
5answers
236 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 ...