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)

32
votes
3answers
1k views

How does vim steal root owned files?

Witness the following: sh-3.2$ mkdir testcase sh-3.2$ cd testcase sh-3.2$ sudo touch temp sh-3.2$ ls -al total 0 drwxr-xr-x 3 glen staff 102 19 Dec 12:38 . drwxr-xr-x 12 glen staff 408 19 Dec ...
0
votes
1answer
640 views

Remove noexec from Home folder

I trying to deploy an rails application into /home/app/myapp, but when application tries to connect to Mysql, I get this error: ** [out :: 192.168.110.50] ...
1
vote
1answer
289 views

Can I export an NFS share with faked root privileges

I'm writing software for an embedded linux system and I'm using an NFS share as root directory. The root filesystem resides in /srv/nfs/rootfs, and it is exported using the following /etc/exports: ...
1
vote
2answers
2k views

How to allow www-data to create a folder without giving read access to the parent folder

I'm not exactly sure the right question to ask, so I'll try to explain what I'm trying to do. I have an internal web application (in PHP) that I want to be able to create a folder. The trouble is ...
3
votes
1answer
99 views

How to display the permissions of a new file in the status line of the Vim editor?

With the following piece of code I get the permissions for an existing file: augroup Get_file_perm autocmd! autocmd BufWinEnter,FileChangedShell * let w:file_perm=getfperm(expand('%:p')) augroup ...
0
votes
4answers
906 views

umask is not working for directories

I have an odd problem with umask. My current setting is: $ umask 0022 $ umask -S u=rwx,g=rx,o=rx This only works for files though and not directories: $ touch abc $ ll abc 0 -rw-rw-rw- 1 user1 ...
1
vote
1answer
138 views

Don't have write permission in partition

In my PC I have installs Windows7 and then Ubuntu as OSes. When I try to access other partitions ( E: and F: which I'm using from Winsows7 OS) it get mount without any issue and can read and modify ...
1
vote
2answers
291 views

compiling with gcc broken for users but fine for root

So somewhere along the way compiling as a regular user has stopped working on my server. I'm on Debian Stable. Can't think what has changed on my system that would result in this, or how to fix it, ...
2
votes
2answers
728 views

Moving a root directory to a separate partition

I'd like to create a new partition and move the contents of the /var directory to it for the security reason of having /var/www and other subdirectories "mounted" with nosuid, noexec, and nodev ...
0
votes
1answer
278 views

File permission mechanism in Unix like systems

Can some one please explain with a an example the file permission mechanism in Linux and other Unix like systems ? What are the nine bits for ? Why do we have a group id for a user as well as for a ...
2
votes
2answers
234 views

I can not remove folder from server

Accidentall I created the folder on remotely server (Server OS is Linux) using php: mkdir("folder_name",0); Now I can not delete this folder from server. I think this is from permission, because 0 is ...
1
vote
2answers
221 views

Run program with additional supplementary group

I am looking for something like sudo (or something that can be run from sudo) that allows me to run a program with my uid and primary gid, but with an additional supplementary group.
0
votes
2answers
112 views

Change/Create permissions for a folder

How can I create (if the folder is new) or change (if the folder was already existent) permissions for a folder? In particular, I want to create a subdirectory in /etc/bind/ where I can put the ...
1
vote
1answer
769 views

add members of wheel group, sudo access

On Fedora15, following this wiki, I added a user to wheel group, which is already in the sudoer config file. but still I get not-a-sudoer error prompt. Should I specifically name every member of a ...
2
votes
2answers
313 views

Pre-defined umask under a given path [duplicate]

Possible Duplicate: How to set default file permissions for all folders/files in a directory? Say I have default umask, umask1. I would like all files/folders that I create/modify under a ...
1
vote
1answer
165 views

Accidentally set /lib permissions to 644

Long story short, I've got an Ubuntu server box that was recently compromised (I believe through a known exploit of an older version of Tomcat, which has already been updated). Part of the exploit ...
1
vote
1answer
250 views

Transmission client can't access mounted NFS share

I set up transmission-daemon on my Scientific Linux 6.3 machine to download files to a mounted NFS share (mounted during boot via /etc/fstab). The directory that the NFS share is mounted to was ...
3
votes
2answers
258 views

Linux isn't sure whether a file exists or not [duplicate]

Possible Duplicate: Getting “Not found” message when running a 32-bit binary on a 64-bit system ts3user@...:~/ts3$ dir CHANGELOG LICENSE doc ... ts3server.pid ts3server_linux_x86 ...
1
vote
1answer
489 views

Samba share file permissions - users can't open files that I create

I have set up an Ubuntu server (12.04 LTS) for samba file sharing. The problem I'm having has to do with files that I create on the server. Other users can't open them because I created them under a ...
3
votes
2answers
2k views

getting 553 - cannot create file in vsftpd (ubuntu 12.04)

I'm trying to setup a ftp account for a user that has read/write access to one folder: /items/myuser I've set up the account with username 'myuser' in Linux with the adduser command. After that, I've ...
1
vote
1answer
889 views

Accessing another user's files

I have a file "abc" with permissions 440 .The owner of this file is "root" and the group of this file is "groupabc" . I have a user "user1" .Is their anyway I can see the contents of files "abc" using ...
0
votes
2answers
213 views

sudo: script launched from another script won't redirect standard output

I'm using AIX 5.3 with sudo 1.6.9p23. Sudoers file grants user fcomartin permission to run any command as user oas: fcomarti ALL=(oas) ALL User oas has a bash script called menu, which launches ...
1
vote
2answers
2k views

wireshark: Couldn't run /usr/sbin/dumpcap in child process [duplicate]

Possible Duplicate: How to add write permissions for a group? When I run Wireshark, It shows the following message: Couldn't run /usr/sbin/dumpcap in child process: Permission denied Are ...
6
votes
1answer
2k views

addgroup vs groupadd

I happen to know there is a slight difference between adduser and useradd. (i.e., adduser has additional features to useradd, such as creating a home directory.) Then what is the relation between ...
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 ...
2
votes
2answers
701 views

How to prevent users from deleting a directory?

I tried "chattr +i DIRNAME", it's great, but I cannot create files in the DIR after chattr. What else are there to prevent users from deleting a Directory? root@HOST ~] mkdir test [root@HOST ~] ...
2
votes
2answers
396 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 ...
0
votes
3answers
94 views

File Privileges

There is one user Lets call him B and he needs access Just to Read the File MEANS READ ACCESS and that file is own by another user A . How can I grant access to user A's file to User B.
2
votes
1answer
263 views

Hide parent directory but allow to view dir

I would like the following result on my UNIX system: ls -l /users/test -> permission denied, or any other way so I can't see the content of it. ls -l /users/test/testdir/ -> shows all files in the ...
2
votes
1answer
3k views

Why can I not chmod a file?

[nathanb@ka /x/sim/nathanb/nbsim1] ls -al ,nvram -rw-r--r-- 1 root root 2097152 Jul 5 2011 ,nvram [nathanb@ka /x/sim/nathanb/nbsim1] sudo chmod a+w ,nvram chmod: changing permissions of ...
7
votes
2answers
565 views

chown removes sticky bit: bug or feature?

Steps to reproduce: germar@host:~$ cd /tmp/ germar@host:/tmp$ touch test && chmod u+s test && ls -la test -rwSr--r-- 1 germar germar 0 Nov 2 20:11 test germar@host:/tmp$ chown ...
2
votes
2answers
694 views

Can't copy/move between filesystems with SFTP

Are there any limitations on SFTP that prevents a user from copying between filesystems? I have a SLES with SFTP, and users can't copy/move files between filesystems, even when the target is chmod ...
1
vote
0answers
81 views

Running Tomcat MySQL and Apache under a group

I am trying to set up a web server at home using Ubuntu, but prefer my bash scripts to be platform agnostic hence why I am asking here. I also dislike apt-get everything. I am trying to create a ...
1
vote
0answers
555 views

ntp cannot open shared object file: Permission denied

On a server I haven't worked on, ntpd is broken: # /etc/init.d/ntpd start ntpd: error while loading shared libraries: libz.so.1: cannot open shared object file: Permission denied but permissions ...
2
votes
1answer
3k views

CentOS 6 VSFTP 553 Could not create file

I installed vsftpd yesterday on CentOS 6, however didn't get a chance to test it today. When I went to upload a test file it's coming back and giving me this error: 553 Could not create file After ...
3
votes
2answers
485 views

Why is bash giving me (apparently) conflicting information about a file?

Background I am working on a RHEL 5 cluster. I want my Fortran program to read the file /home/bob/inputs/input_1 I asked Bob to give me permission to read all contents of inputs: [bob@server]$ ...
2
votes
2answers
118 views

Do best-practices indicate that usage of /var should be restricted to sudoers

I wrote a package, and would like to use /var to persist some data. The data I'm storing would perhaps even be thought of as an addition for /var/db. The pattern I observe is that files in /var/db, ...
1
vote
1answer
262 views

Cron job - permission denied creating a file

I have a cron job: #!/bin/bash fn=db.backup.$(date +%m-%d-%y).sql mysqldump -uMyUsr -pMyPass --add-drop-table dbName> $fn find ./ -name '*.Z' -type f -mtime +7 -exec rm -f {} \; I get an error: ...
12
votes
2answers
17k views

File permission issues with shared folders under Virtual Box (Ubuntu Guest, Windows Host)

I am using Ubuntu on Virtual Box and I have a folder which is shared between the host (Windows) and the VM (Ubuntu). When I open any file in the share folder in Ubuntu, I can not change it as its ...
1
vote
2answers
1k views

proftpd does not change default group for new files

I am Trying to configure ProFTPd to change group for newly created files/directories. In my config I have this: <Directory /home/*> GroupOwner www </Directory> Which does not seem to ...
3
votes
2answers
200 views

What is the proper solution to a web server trying to write to a directory?

So, I have a box with a "deploy" user. This deploy user owns a code repository and wordpress is running on this box... When wordpress attempts to do something like upload a plugin, it is using the ...
6
votes
4answers
2k views

When does chmod fail?

Under what circumstances will chmod fail? I looked at the man page but it only specifies usage and doesn't go into details about what circumstances it won't work in. I'd assume chmod will work if: ...
2
votes
0answers
2k views

Samba's “inherit permissions” does not inherit modes for other

I have a share with "inherit permissions = yes". I have a directory in the share with mode rwxrwsr-x. If I create a subdirectory, the modes are rwxrws---. The same happens with a parent directory with ...
1
vote
3answers
682 views

Copy files with permission 200

I want to recursively copy a directory, preserving file attributes, which contains a directory tree including some files that have permission 200 (i.e. --w-------). The copy command cp -ar ...
2
votes
4answers
850 views

Automatically change file permission upon write to a folder

How can I create directories so: /data /data/user1 /data/user2 and make sure that whenever root writes inside them, depending on which directory it writes to, different owners are set. Example: ...
2
votes
1answer
334 views

Specific directory permission for one user using sftp

My web server structure looks like this: /Home/User/Public_Html/Website_one /Website_two /Website_three/Directory_one ...
2
votes
1answer
245 views

How come I can append to files to a directory without write permissions?

I understand this first example: > mkdir foo > chmod u-w foo > touch foo/test touch: cannot touch `foo/test': Permission denied > echo "BAD" >> foo/test bash: foo/test: Permission ...
1
vote
1answer
148 views

How to disable messages in unix if mesg and chgrp not allowed?

This is one of my questions for my exam .. We are not supposed to use mesg y/n for this but we should effectively avoid mesgs along with the problem of not being able to change groups.
3
votes
2answers
615 views

Block SSH to all but root user

How can I modify my sshd_config so that it blocks access to all users except the root user? I've had a look and I tried AllowUsers root DenyUsers * But that doesn't do anything
5
votes
2answers
5k views

How do I find out if I am sudoer?

How does Linux system behave when I am not sudoer? Here is what happens if I try to use sudo: server:/tmp>$ sudo cal [sudo] password for user: Sorry, try again. Is it possible that I just don't ...