Tagged Questions
1
vote
4answers
54 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 ...
2
votes
1answer
47 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
35 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
98 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 ...
3
votes
2answers
98 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
188 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 ...
0
votes
1answer
77 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
36 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 ...
3
votes
1answer
249 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
103 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
139 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
77 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
267 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
127 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
105 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 ...
3
votes
1answer
507 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
290 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 ...
1
vote
1answer
151 views
Correct owner, group and permissions when mounting an image file
Suppose I have an image home.img of a home partition of another linux machine (B). On that machine there is a users userB and there is a special group, groupB. Consider for example a file fileB in the ...
2
votes
2answers
541 views
Limited SSH user on Ubuntu 12
I'm running Minecraft on a server. How can I give my friend SSH access just to the minecraft folder (a root folder), the screen command, and some ports?
7
votes
3answers
424 views
Prevent a unix account from being able to SSH [duplicate]
Possible Duplicate:
Disable direct login for normal users (like oracle) in linux but allow scp and sftp?
I want to prevent a unix account from being able to be SSH'ed with, but it should ...
0
votes
1answer
163 views
Incompatible group permissions in Linux - Is it a bug? [duplicate]
Possible Duplicate:
How to apply changes of newly added user groups without needing to reboot?
I am on Ubuntu 11.04. I am creating another user and placing an existing user in the group of ...
1
vote
1answer
867 views
How to create an user only with SSH -access and easily-set-up .ssh -dir perms?
I often mess up when I manually set up the .ssh -dir, easy to forget some flag. I often need to create a new user and only allowing access with SSH, how can I do that? Basically, I want to stop doing ...
2
votes
2answers
300 views
How to set permissions what users can see (drives, folders) on opensuse 12.1?
I have a several users on one machine and its needed to specify which user can access (read & write) specified folders and/or mounted drives.
First of all, one user shouldn't see a ...
1
vote
2answers
686 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 ...
2
votes
1answer
109 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 ...
1
vote
1answer
172 views
permission and user/group of a program executed through a script
I am curious, in the following scenario, what kind of permission does a shell script or Java program has (owner/group/other)?
There is a script called run.sh, and it in turn calls a Java program ...
1
vote
1answer
147 views
Create / Edit files in specific folder using different user / group
I want to know if the following scenario is possible.
I am a user called www-admin and I am in the group www-admin. I am also a sudoer.
I want to have all the files I create in the folder ...
3
votes
2answers
273 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 ...
2
votes
1answer
3k views
Changing user and group ID system wide (including file system attributes)?
(this question possibly related to Linux: simulating/masking user ownership upon mount of 'external' partitions? - Stack Overflow)
I typically use Ubuntu (currently 11.04) as my desktop OS; let's say ...
1
vote
1answer
898 views
Changing my default primary GID for every login session
I read the following about newgrp:
The newgrp command is used to change the current group ID during a
login session.
This made me think, how can I change my default's primary group ...
2
votes
2answers
436 views
su user fails with “grep: /var/cpanel/users/user: Permission denied”
I just did something pretty simple. Given a user user, I modified his user id, primary group's id, and added him to a new group in order to make my server use the same uid and gid as another server ...
2
votes
1answer
114 views
Suddenly changing users [closed]
Has anyone ever encountered a scenario where you are logged into a system going about your standard business, cat, ls, tail, grep, vim, find etc. and suddenly permissions to regular things stop ...
8
votes
2answers
2k views
How to apply changes of newly added user groups without needing to reboot?
Assume I'm logged in with user takpar:
takpar@skyspace:/$
As root, I've added takpar as a member of group webdev using:
# usermod -a -G webdev takpar
But it seems it has not been applied. because ...
5
votes
3answers
7k views
Correct permissions for /var/www/html?
I'm able to write changes in the home directory, but when it comes to the /var/www/html folder, it's not allowing me to make any changes or create new files or folders.
I'm able to view the files in ...
5
votes
4answers
10k views
How can I create and grant a normal user with root privileges?
I'm wondering how to create and grant a normal user (for example, named 'sybase') with root privileges?
I found useradd, adduser, and passwd to be useful, but are there any other files to modify to ...
4
votes
2answers
10k views
How to add a ssh user who only has permissions to access specific folder?
How to add an ssh user who only has permissions to access specific folder?
useradd -d /var/www/xyz.com.tr/musteri -s /bin/bash -g sshd musteri
I created a user called musteri. I set its home ...
2
votes
2answers
233 views
using chown in linux
I want to assign www-data user full rights in folder /var/www/ and all of the files inside this folder.
I have tried chown www-data /var/www/
2
votes
3answers
1k views
How to configure permissions to allow file access?
I'm running Wowza Media Server on my server as "root". The problem is that all files created (recorded) by Wowza are "root:root" and aren't writable, editable, or deletable by any other users. How can ...
4
votes
2answers
2k views
How do I give all the permissions to a file for a single user that's not me?
When I want to grant access to another user to my file, I use chmod 777 file, but if I want to be sure I'm granting permission just for that user, how can I do it?
-- update
The file is owned by ...
2
votes
3answers
2k views
Why is file ownership inconsistent between two systems mounting the same NFS share?
I have one IBM AIX server (serverA) which is connected to the san storage. I have created a volume group and also file system (jfs2) and mounted to directory /profit.
After that I created a NFS ...
1
vote
3answers
162 views
How to make files created by a specific user to have specific permissions by default
Here's a sequence of commands and the resulting output:
$ touch testfile
$ stat -c'%a %A' testfile
644 -rw-r--r--
What must I do so that when a user follows that sequence, I get this output ...
3
votes
1answer
489 views
Set visible directories for SFTP access?
I am setting up SFTP access to one of my machines running Linux with the Dropbear SSH server. When I SFTP onto the machine remotely, I can see the entire filesystem on it, even if I might not have ...
3
votes
3answers
370 views
Unix users, groups, and permissions
I don't understand unix users, groups, permissions, etc. For example, things managed by the chmod, chgrp, usermod, groupadd, etc. commands. How do all these things work?
2
votes
2answers
331 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 ...