All about Unix groups and access control.

learn more… | top users | synonyms

105
votes
6answers
37k views

Where did the “wheel” group get its name?

The wheel group on *nix computers typically refers to the group with some sort of root-like access. I've heard that on some *nixes it's the group of users with the right to run su, but on Linux that ...
0
votes
1answer
49 views

How can I add all my groups to a different user in bash?

I've got a user named foo. I'd like foo to have all the same group memberships that I do. I thought I was close, with this: sudo usermod -a -G $(id -Gn | tr " " ",") node4 The id piped to tr is ...
0
votes
2answers
31 views

How to count how many files belong to each user/group combination?

How to count how many files belong to each user/group combination? I need to do this for each user/group combination that exists, in each of the directory trees /etc, /usr, and /var.
2
votes
4answers
83 views

Can a Linux user have multiple primary user groups?

How many primary groups can an individual Linux user have? If they can have more than one, how does one go about assigning multiple primary groups to a user?
2
votes
2answers
3k 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 ...
8
votes
5answers
6k views

Setting multiple groups as directory owners

On my server I have directory /srv/svn. Is it possible to set this directory to have multiple group ownerships, for instance devFirmA, devFirmB and devFirmC? The point is, I want to subversion ...
5
votes
3answers
1k views

Precedence of user and group owner in file permissions

I just ran into something unexpected (for me) regarding file permissions on Linux (Arch Linux). Basically I have: userX in groupX fileX userX:groupX ---rwx---- What puzzles me: I cannot perform ...
1
vote
1answer
92 views

Is there a whoami to find the current group I'm logged in as?

I'm trying to find my current logged in group without wanting to use newgrp to switch.
1
vote
3answers
45 views

If I delete groups, are users in those groups deleted?

I use ubuntu 14.04 and made 120 users. 115 users are in "student" and 5 users are in "assistant". If I delete groups, then are users in those groups deleted too?
3
votes
1answer
39 views

What is the purpose of the 'ssh' group?

There is a system user named sshd on my system, and a group named ssh: $ cat /etc/passwd | grep ssh sshd:x:120:65534::/var/run/sshd:/usr/sbin/nologin $ cat /etc/group | grep ssh ssh:x:117: My guess ...
-2
votes
2answers
55 views

Delete all users and groups except root in debian

I would like to delete all users present by default on my Debian, but I wonder what can happen if I delete them... I am learning linux so I want to clean everything except root and play around with ...
1
vote
1answer
61 views

logrotate fails to rotate logs: error setting owner

Recently I've noticed that logrotate does not rotate my logs. user1@host:~$ /usr/sbin/logrotate /home/user1/logrotate.conf -v gives me an error: error: error setting owner of /home/logs/mylog.log.1 ...
1
vote
1answer
25 views

share encfs folder within the same group

given an encfs folder mounted under its own user, is it possible to permit read access to someone else (especially a system user), who belongs to the same group? For example user1 owns ...
1
vote
1answer
13 views

Access rights for directory, when you are a part of owner group [duplicate]

Right to the business, here is what I am trying to do foverzar@subsystem /home> ls -aln total 16 drwxr-xr-x 4 0 0 4096 Dec 12 23:07 ./ drwxr-xr-x 17 0 0 4096 Dec 4 13:51 ../ ...
1
vote
1answer
57 views

How to add users to Linux through a shell script

The shell script that I have to write has to create new users and automatically assign them to groups. This is my code so far: echo -n "Enter the username: " read text useradd $text I was able to ...
1
vote
1answer
44 views

Add multiple user to UNIX group in one line

On Centos 6.5 (and probably any) linux, I can create a group: sudo groupadd mygroup and add several users to it: sudo usermod -a -G mygroup userA sudo usermod -a -G mygroup userB sudo usermod -a ...
1
vote
1answer
45 views

group files into fixed-size chunks

Example: Say I have 20 000 images and I need to group them into folders in order to burn them to a CD (max 700MB / folder). General: I have N files and I need to group them into M groups, so that all ...
1
vote
1answer
35 views

Cannot edit visudo

I have to give my user permission to run sudo. I am using CentOs # uname -a Linux lab-hv1-centos1 3.10.0-229.el7.x86_64 #1 SMP Fri Mar 6 11:36:42 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux and have ...
20
votes
2answers
35k views

Getting new files to inherit group permissions on Linux

I am having a problem with permissions on a Linux server. I am used to BSD. When a directory is owned by a group the user who owns it isn't in such as www-data, files created in it will be owned by ...
3
votes
2answers
88 views

Can users in a group access a file that is in another user's home directory?

I have 3 users A,B and C inside a group 'admin'. I have another user 'D' in whose home directory, there is a project folder. I have made D as the owner of that folder and assigned 'admin' as the group ...
1
vote
0answers
24 views

What command should I use to explicitly set list of groups and execute a command?

To execute a command as other uid, one uses su. The list of supplementary groups is not specified on command line, but instead read from configuration files (/etc/passwd, /etc/group), etc. Which tool ...
1
vote
1answer
53 views

How to switch a group without asking for a password?

In linux, there's two files where group definitions are specified. One of them is /etc/group and the other is /etc/gshadow. I want my regular user to be able to switch a group while starting a process ...
7
votes
1answer
9k 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 ...
-1
votes
1answer
27 views

Allowed group can't access a folder [closed]

I've a weird problem on my linux machine, I've multiple users, we can say u1, u2, u3... who all belong to a group G. I have a group folder in /home who belong to one of these user (we'll say u1), and ...
1
vote
6answers
228 views

How can I find out which users are in a group within Linux?

I've recently been creating new users and assigning them to certain groups. I was wondering if there is a command that shows all the users assigned to a certain group? I have tried using the 'groups' ...
2
votes
1answer
17 views

(vsftpd) uploaded file group

I'm creating an ftp server with vsftpd, and I've almost finished, the only thing remaining is when I upload a file (logged as an user U), the file belongs to a group which has the same name (so group ...
2
votes
1answer
71 views

Negative GID in /etc/passwd?

I got following entries in /etc/passwd and /etc/passwd- on one system: userfoo:x:501:-513::/home/userfoo:/bin/false There's no group 513 anywhere on the system. What's this "negative" gid or a gid ...
1
vote
1answer
23 views

Group Directory permission

you have been asked by couple of programmers to make ProjectA a group directory on a UNIX server which allows them to create files under that directory to facilitate collaborative work, but only the ...
3
votes
1answer
74 views

How to specify owner and permissions for an NFS mount?

I have an NFS mount in fstab: 10.0.12.10:/share1 /net/share1 nfs rw 0 0 which defaults to root as owner and group and 777 permissions. How do I specify another owner and different ...
2
votes
1answer
76 views

scp file as another group

I would like to scp a file, however my primary group does not match the permissions of the destination directory so I get a permission denied message when I try to scp. I have the correct group as a ...
1
vote
0answers
113 views

Give a user permission to one folder

I have set up my machine so that my group "sftponly" can access the users home folder. But right now, the users in the group don't have permission to other folders, but they have permission to see ...
3
votes
1answer
64 views

Why there is a group member field in both /etc/group and /etc/gshadow

I am learning more about Linux user and groups in depth and noticed fourth field in both /etc/gshadow/ and /etc/group are exactly same. Do they have any difference or is there any special reason why ...
4
votes
2answers
70 views

Can an AIX user that appears in etc/group but not etc/passwd still log into a server?

Looking at etc/group and etc/passwd files, I see accounts listed in various groups in the etc/group file that do not appear in the etc/passwd files. Can these accounts still log in to the AIX server?
6
votes
4answers
3k views

Reasons behind the default groups and users on Linux

Having a look at the default users & groups management on some usual Linux distributions (respectively ArchLinux and Debian), I'm wondering two things about it and about the consequences of ...
0
votes
1answer
65 views

user exists when trying to add user to systemd-journal group.

I have been wanting to read systemd-journal by running/using journalctl -b . Now if I run it as a user I get the following :- $ journalctl -b Hint: You are currently not seeing messages from other ...
4
votes
2answers
7k views

What is nobody nobody user and group?

On my server (Synology DS212) some files and folders have nobody nobody users and groups. What are the characteristics of this user and group? Who can write of read this file? How can I change it ? ...
0
votes
2answers
34 views

Can't change group permissions [closed]

I am currently having an issue which is preventing me from editing the group permissions for my '/media/rnetBackup/' directory. I have tried editing the permissions using nautilus and using chgrp -R ...
0
votes
1answer
40 views

Why can't I create directories under /root as a member of root? [duplicate]

I've done the following: sudo usermod -a -G root userA sudo su - root cd / chmod 775 root ls -aln -- drwxrwxr-x. 6 0 0 4096 Sep 13 22:04 root I can cd /root from my userA, but I can't make ...
7
votes
1answer
1k views

File owner must belong to file group?

I have a rather simplistic understanding of file permissions on *nix systems. I understand that there is a file owner and file group, but is there a hard and fast rule on whether the said file owner ...
1
vote
1answer
70 views

Read file permission denied despite sufficient permissions [duplicate]

I'm attempting to cat a file with 770 permissions as a user who is part of the group (but not the owner of the file). This should provide sufficient permissions to my understanding, yet I encounter a ...
8
votes
3answers
24k views

How do i extend a partition with a LVM and the contained physical volume and logical volume?

On my 240 GB SSD i had at first two partitions, one containing the Logical Volume with Linux Mint and the other had contained a NTFS partition to share with Windows. Now i removed the NTFS partition ...
1
vote
1answer
272 views

groupadd: group 'terminal' already exists in Linux

I have created a group called "terminal" using groupadd terminal and when I list out the groups using groups command it will not show the newly created group name in the output but if I add the same ...
2
votes
2answers
112 views

Why can't I create a file in a directory where I have group write access? [duplicate]

There's a situation I don't quite understand. I have this directory, where the group 'webadmin' has rwx rights : $ ls -la total 8 drwxrwxr-x 2 root webadmin 4096 Aug 27 12:17 . ⋮ ...
13
votes
1answer
6k views

In /etc/group what is the meaning of the second field?

A sample /etc/group file contains the following entries: root:*:0: adm:!:4:logcheck antoine:x:1000: The man pages I've read (Debian & OSX) says the second field is to store a group password. ...
57
votes
3answers
74k views

Make all new files in a directory accessible to a group

Suppose I have two users A and B and a group G and a folder foo, both users are members of G (using linux and ext3). If I save as user A a file under foo, the permissions are: -rw-r--r-- A A. ...
1
vote
1answer
62 views

directory permissions [closed]

I'm currently working on a PHP server explorer, and I have to determine if a directory is empty or not readable because of insufficient permission. My web application is running under the user ...
2
votes
3answers
3k views

How to add group to a user without removing other group in suse linux with usermod?

I have one user, which has one primary group & one secondary group, like: [ testuser Welcome ~ ]$ id uid=2000(testuser) gid=2000(testuser) groups=2000(testuser),27(sudo),2001(testgroup) ...
132
votes
8answers
199k views

How do I remove a user from a group?

Which command should I use to remove a user from a group in Debian? When adding a user to a group, it can be done with: usermod -a -G group user However, I could not find a similar command ...
1
vote
2answers
223 views

Where & How is user group information stored in Ubuntu? [closed]

Two places possible: /etc/group and /etc/passwd. If I use command: adduser [username] [groupname], then the user would be added to the group, and the file /etc/group would then be updated. However, ...
1
vote
1answer
38 views

Unable to execute program without root privileges regardless of group or permissions

avrdude is a simple tool that allows downloading of a program to a target microcontroller. For completeness, the command I am trying to issue is: avrdude -p atmega328p -c usbtiny -P usb -v -U ...