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
3answers
774 views

LFS can't cd to lfs/source - permission denied

I'm trying to build a LFS using version 7.1. I've followed all of the steps up to 5.3 and now I'm stuck because I can't change to $LFS/sources - I get the message: bash: cd: /mnt/lfs/sources: ...
2
votes
1answer
3k views

How to change permissions of multiple files found with find command?

I have a directory with numerous files. Part of the files have the 755 permissions and the other part have 644 permissions. I'd like to convert the files with 755 permissions to 644. I have tried the ...
4
votes
2answers
2k views

/etc/crontab permissions

The /etc/crontab file has the permissions: -rw-r--r-- I understand that this file is for system cron jobs and other users should not have permission to modify it. The current permissions allows all ...
2
votes
1answer
608 views

using Set uid to run a root command from non-root user

Consider the following two files. summarize's executable UID bit has been set, so that another user belonging to another group can execute the summarize executable that uses the customers.dat file. ...
5
votes
3answers
5k 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 ...
1
vote
1answer
140 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 ...
2
votes
2answers
76 views

PHP file permissions for Development machine

I've just upgraded my development machine and have moved over a website I was working on. However, the permissions don't seem to have moved over properly. The dev machine is a Linux machine which runs ...
7
votes
3answers
5k views

Give user permissions to all files and folders

I want to have a user who has access to all the files and folders on the system. This is for the purpose of using RSYNC on a local machine to backup a remote machine. At the moment we are using the ...
2
votes
2answers
81 views

How can I set these permissions?

I was so sure of myself, I thought I knew about permissions. Until someone asked me this. Having these users: User Group ---- ----- juan juan pedro pedro maria maria jose jose miguel ...
11
votes
2answers
2k views

Permissions/ownership of /usr/local/bin

From what I understand, the right place to put your own scripts is /usr/local/bin (for instance a script I use to back up some files). I notice that this folder is currently (by default) owned by ...
4
votes
2answers
771 views

How to set secure permissions for multiple users and multiple websites?

On a Gentoo 3.2.12 server with apache2+php, there are several websites running: /www /website1 /website2 ...etc The apache user should have read-only access to all the websites. There ...
1
vote
3answers
2k views

Why is the default umask value for useradd in openSuSE set to 022?

I recently built a very simple test environment with oepnSuSE. As I tried to configure a shared directory, wihtout using ACLs, but with SetGID on that directory instead for some reason, I noticed ...
9
votes
2answers
17k views

SSH and home directory permissions

It took me hours to solve this SSH problem with one of my class accounts on my school's servers. I couldn't ssh into one particular class account without entering my password, while passwordless ...
5
votes
2answers
3k views

If I change permissions on a tar file, will that apply to the files inside it?

I have a script that runs regularly via cron, that creates a tar.gz file for the purpose of backing up a directory. For reasons beyond my control, the only user who can execute the script via cron is ...
2
votes
1answer
293 views

Daemon file access denied while it shouldn't

I recently installed a new SSL certificate and then also decided to tighten security a bit by make the private key less readable. This caused a problem with exim. The certificate is now 640 with ...
6
votes
3answers
3k views

Test effective permissions of file for user

Is it possible to test effective permissions of a file for a specific user? I normally do this by su user and then accessing the file, but I now want to test this on an user with no shell (i.e. a ...
1
vote
1answer
1k views

exclude commands from user's sudo permissions

Consider the following line in a /etc/sudoers file: username ALL=(ALL) ALL, !/usr/bin/passwd as far as I know, this allows user username to use sudo, unless he not uses /usr/bin/passwd. But ...
4
votes
1answer
2k views

NFS different uig/gid on hosts

Scenario: There are different mappings of UIDs and GIDs between hosts that would like to have NFS share. Is there workaround without changing number mapping on hosts ? Example: Is there a way to ...
5
votes
2answers
810 views

Protect files from `rm -f`

Much to my immediate chagrin, removing write permission from a file does not seem to protect it from rm -f: touch foo chmod a-w foo rm -f foo How can I protect a file from accidental deletion when ...
1
vote
2answers
1k views

How to configure sudoers to allow running sudo command under other group and user name?

How to configure sudoers to prevent having the Sorry, user ****** is not allowed to execute error message. Background For the purpose of testing how a python script under a less privileged user and ...
2
votes
0answers
511 views

proper permissions under HTTP root with Apache2 + FastCGI + Suexec

I currently have a setup which runs Apache2 + FastCGI PHP + Suexec. As an example, I'm using /mnt/data/www/vhosts/inflex.co.uk/htdocs as a DocRoot for one of my virtual hosts. I have a script ...
1
vote
4answers
892 views

grant permission in linux

I have a linux web server with 2 hard-drives. There are 2 users, one can access /home/user1 and the other user can access /home2/user2 I would like to grant user1 permissions to access /home2/users/ ...
1
vote
2answers
4k views

Giving PHP permission to write to files and folders

UPDATED FOR FURTHER CLARITY: According to http://expressionengine.com/user_guide/installation/installation.html, it says: For most Unix hosts the following is typical, but you may check with your ...
2
votes
4answers
727 views

Editing a file without overwrite permission

Is it possible to set permissions for file to keep it editable but without permission to overwrite? I mean possibility to edit the file with text editor, but denying any attempt to replace the file ...
2
votes
1answer
902 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 ...
2
votes
2answers
598 views

Search for file permisions other than 755

In AIX really, how can I search in several directories and those below it, for files that are not of the specific permissions of 755. So I want to search /path/to/, /path/to/mydir, ...
2
votes
2answers
945 views

Is it possible to enable execution of files from a cifs mount in bash?

I have a remote mount with cifs and it would seem there is no way to have bash execute scripts from that mount, is it possible to enable such execution? ls -lh ini* -rwxrwxr-x 1 alan 500 222 ...
1
vote
2answers
746 views

permission reporting on sudoers

I'm looking for a good, consistent and easy way to do a report of sudoers permissions for every user and group on the system. For users, I want the report to include permissions granted via group ...
2
votes
1answer
2k views

How can ubuntu/truecrypt be configured so users can mount volumes if-and-only-if they have proper permissions on the mount-point?

If I add the line: ALL= /usr/bin/truecrypt to the sudoers file this lets all users mount volumes at arbitrary mount-points. The problem is a user could create a truecrypt volume and then mount it at ...
5
votes
2answers
5k views

tail program output to file in Linux

I know we can use below format to redirect the screen output to a file: $ your_program > /tmp/output.txt However when I used below command, it says "-bash: /home/user/errors.txt: Permission ...
0
votes
1answer
908 views

Chmod u-x isn't changing anything and I have no idea why

I'm a user on a Debian machine. When I create a file in my home directory, the default permissions appear to be 700, even though umask returns 0022: eulerz@foo:~$ touch testing eulerz@foo:~$ ls -l ...
21
votes
6answers
8k views

Can a script be executable but not readable?

Is it possible to execute a script if there is no permission to read it? In root mode, I made a script and I want the other user to execute this script but not read it. I did chmod to forbid read and ...
3
votes
1answer
2k views

How do I make all current and future files in a directory readable by a certain group/user?

I have a "Drop Box" directory for students to submit assignments. Its permissions are set to "drwx-wx---" where all of the students belong to the group. This lets them write to but not read from the ...
5
votes
3answers
2k views

logrotate doesn't work for munin after last update on OpenSUSE 11.4

I'm using munin 1.4.5 on OpenSUSE 11.4. Lately logrotate was updated to fix some permission problems and after that complained with Mar 3 12:15:05 lucien logrotate: error: "/var/log/munin" has ...
1
vote
1answer
118 views

Why are directories created with permissions 2070 and files with 060 in a directory with setgid bit?

I have the following directory: $ ll -d neptune drwxrws---+ 5 beamin psych 4096 Mar 7 16:18 neptune $ getfacl neptune # file: neptune # owner: beamin # group: psych # flags: -s- user::rwx ...
2
votes
2answers
256 views

change owner of a file and it's parent directories

I have a file that has 10 parent directories. When I change the file's owner with chown command new owner still can't write to file because the file's parent directories still have a different owner. ...
6
votes
2answers
10k views

Unable to delete file, even as root

I've got a file on remote machine (saying that, cause I don't know who the heck created it), that I've to remove. user@machine:~/folder$ ls lift_proto.db.lock.db And permissions are like this: ...
2
votes
1answer
591 views

403 forbidden issue - .htaccess

I am getting 'Forbidden' 403 problem with my website. Earlier today it worked. The only thing I did was try to access other folders (eg bin). I checked permissions, and it all seems to be looking ...
2
votes
3answers
6k views

Run sudo as another non-root user and save in this user's home directory

I added a new group: ircuser and a new user: ircuser In visudo I placed this line: myuser localhost=(ircuser) NOPASSWD: /usr/bin/irssi Created ircuser directory, where config files, caches, etc ...
2
votes
1answer
1k views

Mount drive from redhat to a windows share with CIFS

I have been trying to mount a drive, but anything i do i get 'Access Denied', I tried: mount -t cifs //192.168.x.x/m -o username=user,password=mypass /mnt/mymount mount -t cifs //192.168.x.x/m -o ...
0
votes
1answer
249 views

Help with a php web program running a shell script?

I'm a sys admin as well as web developer at my job. I have a php program that prompts the user for a number of parameters which then using those parameters must execute a batch shell script. I've ...
1
vote
2answers
1k views

Allow non-root process to access all home directories without compromising security?

Any ideas how to allow one non-root process to access (read&write) all home directories without compromising security? Normal users should not have access to each other's home directories. All ...
3
votes
2answers
2k views

Tar overwrites read only files

I created directory test, created file 1.txt in test, wrote 'Before' in this file. Then I went cd .. and used the command: tar -cvzf ./test.tgz ./test Then I entered the test dir again. Opened ...
1
vote
2answers
2k views

do not allow a directory to be deleted but make new files in it?

The question in my assignment says this: create a directory temp with all permissions for everybody, that cannot be deleted and copy hello.sh in this directory giving execution rights for ...
4
votes
2answers
166 views

System files with strict permissions

Usually, when we run ls -l we can see such picture -rwx...- so the owner always has the full stack of permissions. And usually the owner of the system files is the root. Are there any system files ...
2
votes
1answer
166 views

Permissions UMASK for New Directories

I have a directory "dir1" who's owner is "owner1" and it has 775 permissions. Another user in the same group as "owner1" is called "owner2" Whenever a file is written to "dir1" by "owner2" I need ...
3
votes
1answer
201 views

How do I stop Apache from running as root?

New on the job, small place, and the security stuff just landed on my desk. I was hired to be a front-end developer. Happy to learn new things, but never had to do sysadmin stuff before. I started ...
9
votes
1answer
239 views

Make group permissions same as user permissions

I want to set the group permissions for all files and subdirectories within a certain parent directory to whatever the user permission setting for that specific file or directory is. For example, ...
3
votes
2answers
454 views

How to change file permissions for newly generated files in largefiles directory of Mercurial?

I got some Mercurial repositories which are served by Apache over HTTP. But there is a dedicated user performing some automated tests, which needs to check out the repositories locally. Recently this ...
5
votes
2answers
3k views

find files which have a higher permission than xxx

I want to find all files which have a higher permission than e.g. 640. Perhaps this would work with a find and exec command. But my knowledge isn't sufficient for such a task.