Questions tagged [chgrp]

For questions about resolving errors when attempting to change the group owner of a file.

For questions about changing the group owner of a file, or any issues arising relating to changing group permissions.

chgrp specification (The Open Group Base Specifications Issue 7, 2018 edition)

26 questions
21
votes
1 answer

How to perform chown and chgrp in one command

In order to change both a file's owner and group we can do this: chown trump file chgrp trump file but can I do both commands in one approach or one command?
yael
  • 12,598
  • 51
  • 169
  • 303
12
votes
4 answers

Howto prevent chgrp from clearing “setuid bit”?

We have RH based Linux images; on which I have to "apply" some "special archive" in order to upgrade them to the latest development version of our product. The person creating the archive figured that within our base image, some permissions are…
GhostCat
  • 240
  • 2
  • 9
6
votes
2 answers

How do I recursively run "chgrp" without changing the group if it matches a specific group?

I just copied all the files/subdirectories in my home directory to another user's home directory. Then I did a recursive chown on his home directory, so that he became the owner of all his files/subdirectories. The last thing I need to do is a…
pacoverflow
  • 278
  • 3
  • 15
5
votes
4 answers

Can't create directory in directory owned by group

I have a group called homeperms on an Ubuntu system, with a few users: $ cat /etc/group | grep "homeperms" homeperms:x:1004:jorik,tim.wijma,vanveenjorik,jorik_c And I've done $ sudo chgrp -R homeperms /home. But when I try to md /home/flask. I…
Jojo
  • 155
  • 1
  • 5
2
votes
1 answer

why chgrp or chown command causes file loss xattr

[root@localhost ~]# getfattr -m - -d /bin/tcpm getfattr: Removing leading '/' from absolute path names # file: bin/tcpm security.capability=0sAQAAAgAUAAAAAAAAAAAAAAAAAAA= security.selinux="system_u:object_r:bin_t:s0" [root@localhost ~]# chgrp 951…
Lee Bruce
  • 43
  • 5
2
votes
1 answer

modify group for one command

I want to execute one command and I want that it is executed with a specific groupname, that I'm belonging to, but which is not my default group. So all files created will belong to that group. Is there a command for that? There is chgrp to fix it…
2
votes
2 answers

chgrp chown usermod are useless if not root?

I am logged under 'achille' achille belongs to 2 groups: groups achille achille: achille users I want to change the group owner of file 'tree.test' to group 'users' ls -l tree.test -rw-r--r--. 1 achille achille 2512881 Dec 1 11:53 tree.test I…
achille
  • 103
  • 9
1
vote
1 answer

chmod file permissions under home directory

I am a beginner here at unix administration. When we create a Unix user, we get a home directory for the user. Inside the home directory i.e ~/ for all the files and directories that we create, what is the use of setting the file permissions? As…
zilcuanu
  • 135
  • 2
  • 6
1
vote
4 answers

How to securely sanitize permissions for a subtree

On our server, there are multiple (currently two, expected three or four) users allowed to deploy a new version of our application. This process consists of downloading a few files from a trusted source git repository and starting the application (a…
maaartinus
  • 4,979
  • 7
  • 30
  • 29
1
vote
1 answer

Access manpage(2) on OS X

In Mac OS X, at the end of the chmod man page, it shows See also: chmod(2) But when I enter man chmod(2) It says that there is no such man page. How can I access the man page chmod(2) man page? Is there a command to do this, or us it only…
John Militer
  • 773
  • 4
  • 14
  • 29
1
vote
1 answer

custom sysconfdir for coreutils

I compiled coreutils with --sysconfdir=/test/etc instead of default /etc, moved /etc/group to /test/etc/group, and chgrp failed with chgrp: invalid group: $groupname. How can I fix that and make chgrp work with new sysconfdir?
0
votes
0 answers

`chown` not working, even using sudo

I am getting this error from git: fatal: detected dubious ownership in repository at '/run/media/marcel/Хранилище/Dev/Desktop/SimpleAccent' To add an exception for this directory, call: git config --global --add safe.directory…
MrArsikk
  • 11
  • 3
0
votes
1 answer

How can I grant a user group permission to start/stop a custom service?

I have a service that exists in the root directory and I want to give user group admin permissions to run the service. The service exists in /root/home/custom_service/service.service I tried chgrp admin ./home/custom_service/ then chmod g+rx…
jo.oj
  • 3
  • 1
0
votes
0 answers

read write file permission in linux

I have Ubuntu WSL with default username wsl and new user with username newuser List all files : wsl@Optiplex:~$ ls -la total 176 drwxr-xr-x 13 wsl wsl 4096 Nov 1 06:36 . drwxr-xr-x 4 root root 4096 Oct 3 03:09 .. drwxr-x--- 2 wsl wsl …
Anas Fanani
  • 101
  • 1
0
votes
1 answer

change group ownership specifying from to for entire file system

I have 3 specific user accounts (less than 10 anyway), for all files & folders under a specific /data or /home directory, I want to change just the group ownership of all occurring files/folders of those specific users. I don't know where everywhere…
ron
  • 5,749
  • 7
  • 48
  • 84
1
2