0
votes
1answer
16 views

Debian file's permissions for secondary's group of user

I am installing a proftpd server on a debian dedicated server, In order to be able to update some website files in this folder : /var/www/website I have added a new user : my-ftp-user This user's ...
2
votes
0answers
40 views

Easiest way to sandbox an user

I'd like to sandbox a user so that they can only read files under /media/shared/somefolder. What's the easiest way to accomplish this? Users/groups? ACL? AppArmor? Some context: Plex Media Server is ...
11
votes
1answer
424 views

How is file owner and group remembered for an external drive?

I formatted an external hard drive with an ext4 partition and subsequently mounted it. So that I could use the new partition, I did: sudo chown me:me /mount/directory to change the file owner and ...
1
vote
0answers
19 views

Changing pasword for debian live

I have a hooks file, in the hooks folder, that looks like this: echo "root:rootpw" | chpasswd echo "user:userpw" | chpasswd After boot, Debian asks for user and password. When I type user along ...
3
votes
1answer
64 views

Two users with different permissions on same directory

Is it possible to give two users different permissions on the same directory? I want to use it for ftp: userFull gets R+W and userLim gets only Read, depending on who logs on. Im getting stuck on the ...
3
votes
3answers
188 views

Allow other user to copy the files from my folder?

I am working with Ubuntu and I have a jar file in this folder /export/home/david And I am logged in machineB as david user. Some other user is also logged in that same machine. And I want other user ...
0
votes
1answer
47 views

Can't simulate initial login using sudo

$ sudo -iu cyrus sudo: unable to change directory to /srv/cyrus: Permission denied sudo: unable to execute /bin/zsh: Permission denied I don't understand why I would get permission denied for ...
-1
votes
1answer
52 views

How to Always make the ttyUSB0 none root access allowed?

Ubuntu 13.10 64-bit OS. I have a service running using Python serial the application running without root as username. But it has to access /dev/ttyUSB0 , so i need to do every time manually chmod -R ...
1
vote
2answers
48 views

Command to know privileges of a user group

If I run cat /etc/group command or groups username I am able to know the list of groups as group of a particular user. Is there any command through which I could know which type of privileges a ...
1
vote
1answer
46 views

user accessing and permission denied

I had a user john in fedora 19 usergroup marygroup useradd -g marygroup mary usermod -a -G marygroup john In John terminal: cd /home/mary Permission denied cd /home ls -l drwx------. 11 john ...
1
vote
0answers
44 views

Disable commands for users [duplicate]

I have users that login automatically via ssh to a script I defined instead of a shell. The script basically launches a program which has a shell-escape in it which would allow the user to execute ...
-1
votes
1answer
76 views

What can I do if I got locked out by cphulk?

Is there any way in Linux to create another user with root rights? I got locked out by cphulk and I need some other way to log in. Notice many ways to fix this involve logging in to root or whm. ...
2
votes
0answers
226 views

User permissions inside and outside of LXC containers?

I'm running some services inside of Docker LXC containers on my server and I'm beginning to actually do serious things with them. One thing I'm not clear on is how user permissions work inside and ...
0
votes
3answers
25 views

Set the default permission

When I create a file, the permission is 644 (user rw, group r, other r). How can I make the default file generated to have permission as 664?
1
vote
1answer
53 views

How do I identify the user that is attempting to create a file?

I have a PHP script that is attempting to create a file, but it can not because of permissions. I would like to identify which user the system sees as the one requesting to create the file. I would ...
2
votes
2answers
85 views

Configure external HDD for use with multiple linux PCs

I've got an external drive, and I'd like to have a linux partition on it. I formatted everything correctly on one machine with Fedora20 (I have one ntfs and one ext4 partition), but when I plug it in ...
0
votes
1answer
142 views

Why can my gentoo systemd installation only execute files as root?

If I try to login as any other user, via su it says 'permission denied'. If I use su -l it says 'canot cd to /home/<user>'. Logging in via the tty just kicks anyone without a message out except ...
3
votes
1answer
235 views

How to properly setup user/groups/permissions for a web server?

I spent all day figuring this out, but without success, so hopefully I can get some help here: I have Ubuntu 13.10 VPS server with nginx, PHP 5 and MariaDB installed. I created custom system user ...
1
vote
1answer
198 views

Granting permission for all users in a group to write to a directory and all its subdirectories

Trying out Linode for the first time, running an Arch Linux image, I successfully installed nginx as root. This, however, made /usr/share/nginx/html inaccessible to non-root users. Intuitively, I ...
0
votes
3answers
136 views

How to restrict one user files to another user

On my machine there are user accounts. My question is how to restrict access to ones user files. Meaning no one else can access my files at all. How can I setup this restriction? How many root users ...
4
votes
3answers
175 views

restrict student account permissions, give faculty access

I have set up two user groups, students and faculty on Ubuntu 12.04 and created a number of students and faculty accounts. The problem is a student can currently see & read all of the files of a ...
1
vote
3answers
568 views

Setting default username and group for files in directory

Using this helpful post I am able to set a default group and file permissions in a folder. I'm having trouble setting a default owner (teamlead uid 1234). setfacl -d -m g::rwx /my/test/folder ...
3
votes
1answer
91 views

New webserver: What all user accounts should I create and permissions to provide for

This is a followup on my question here. I am setting up the first webserver and am fumbling with what user accounts to create and permissions to provide for better security. Below is what I have. ...
1
vote
1answer
31 views

permission on a user I added locally

I added a user to my Mint (Ubuntu) Desktop so that he could ftp files that I can share – I am peter he is john, so we have /home/peter and /home/john. I want to have full permissions on his home ...
1
vote
0answers
65 views

How come the postfix user can't even read its own files?

I have a Postfix configuration file. Let's assume it's named /etc/postfix/somefile.cf. I have run the following command as root to change ownership of the file to the postfix (105) user: ...
4
votes
3answers
522 views

How to find a file with specific permission of a specific user?

How do I get a list of all the files which permission is "read and write" for a specific user. For example, when I go on the desktop of my mac, then right click on file "A", then "get info", then on ...
2
votes
2answers
216 views

Execute user script as root in startup applications

I just created a script (logscreenlock) to log lock/unlock screen events (derived from this post): #! /bin/bash dbus-monitor --session "type='signal',interface='org.gnome.ScreenSaver'" | ( while ...
3
votes
2answers
2k views

Create user who can only access one directory [duplicate]

I would like to create a user that only has access to one folder and nothing else whatsoever. I have already created a user but he has access to other parts of the system according to corresponding ...
1
vote
0answers
1k views

Permission denied for user accessing mount

Using root I can mount another Linux share no problem. root@crunchbang:/mnt# mkdir javalib root@crunchbang:/mnt# mount -t cifs //10.1.3.7/javalib ./javalib -o username=guest Root can read/write to ...
3
votes
2answers
136 views

Log in as one user but authenticate as another

This might be a weird question but I wonder if there are possibilities to this. When I'm configuring a system I prefer to be root so that I don't have to sudo everything. However, the root account is ...
1
vote
1answer
286 views

halt, poweroff, shutdown, reboot don't require root?

For some reason, I can run halt, poweroff, shutdown, and reboot as a regular user without root. How can I fix this? Is it something to do with user groups, or is it a seting somewhere?
11
votes
3answers
3k views

How to check if a user can access a given file?

*nix user permissions are really simple, but things can get messy when you have to take in account all the parent directory access before reaching a given file. How can I check if the user has enough ...
0
votes
2answers
61 views

Have rights during shell but not in a script (unless I sudo it)

I have a really basic confusion. How does sudo work? I noticed that when I ran a script it failed, since it tried to write a file in a directory that the following permissions: $ ls -l thedir ...
1
vote
4answers
3k views

What type of permissions should a user's home directory and files have?

I'm working with a fresh install of Ubuntu 12.04 and I've just added a new user: useradd -m testuser I thought that the -m flag to create a home directory for users was pretty standard, but now ...
4
votes
1answer
1k views

how to keep file owner same for newly created files

This question is regarding samba file access. I have created a folder A, and under folder A created two folders B and C. And also created three users A, B and C. User A has access to all three ...
2
votes
1answer
111 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 ...
3
votes
2answers
2k views

How to grant non-root user access to device files

I have device file that appears in /dev when a specific board is plugged in. The read and write operations to it work just fine, but in order to open the device file the program needs to be executed ...
4
votes
2answers
601 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. ...
1
vote
1answer
2k views

Why useradd shows Permission denied error

I am working on CentOS 5.5. When I run the useradd command as root, then its working. But when I run the same command from one of the user, then it shows -bash: /usr/sbin/useradd: Permission ...
1
vote
1answer
794 views

Allow all group members to create directories and files

There are 2 users sftp_user apache Both users belong to the updaters group as well as other groups. New directories and files are created in the /updates/ directory. drwxrwsr-x 8 sftp updaters ...
1
vote
1answer
89 views

Securely running LAMP under a specific user

I'm setting up a sandbox type of server that will be used by a couple users as a development environment and knowledge base. The server will have a web frontend so I've installed Apache, MySQL and ...
6
votes
1answer
2k views

Force the owner and group for the contents of a tar file?

I would like to create a tar file with contents belonging to an owner:group pair who do not exist on the system from which the file is being made. Here's the direction I've tried: tar ca ...
1
vote
1answer
196 views

security concern around adding cron user to web application group

I have a permissions issue on my CentOS 5.6 machine with regards to the cron user. On my test/staging environment my cron user (picco-cron) is a member of one group - picco-cron, as below: ...
1
vote
1answer
316 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: ...
0
votes
2answers
118 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 ...
7
votes
2answers
653 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 ...
3
votes
2answers
207 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 ...
1
vote
2answers
143 views

Login to super user for running script

I have sample.sh script in /u01/dump location. I'm running it from root. My requirement is while running the sample.sh script it has to be login as oracle1 user using SU (super user) and display all ...
6
votes
1answer
4k views

Group within group file permissions

I tried finding this on here, but couldn't so sorry if it's a duplicate. Say I have 2 groups and a user: group1, group2, user1 with the following structure: group1 is a member of group 2, user1 is a ...
3
votes
2answers
688 views

Start Vim as my user with root privileges

I have my custom Vim files in ~/.vim and settings in ~/.vimrc. However, sometimes I have to edit some files in /etc and such. If I start Vim like this: $ sudo vim /etc/rc.conf I lose my config ...