Questions tagged [chgrp]

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

Filter by
Sorted by
Tagged with
0 votes
0 answers
431 views

`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 ...
MrArsikk's user avatar
0 votes
1 answer
942 views

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 ...
jo.oj's user avatar
  • 3
0 votes
1 answer
181 views

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 ...
ron's user avatar
  • 6,647
0 votes
1 answer
88 views

How do I have two group owners

I have a file where I want there to be not one but two groups who can have extra privileges to access it. But when I chown or chgrp it to a group it always erases the previous group. How do I add a ...
ConcernedParagraph7235's user avatar
2 votes
1 answer
150 views

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="...
Lee Bruce's user avatar
2 votes
1 answer
251 views

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 ...
Friedrich -- Слава Україні's user avatar
0 votes
0 answers
158 views

How to go through every file and directory on server and change group ownership?

The goal is to loop through every file on the server, check if each file or dir has the 'groupA' group in the permissions. If the 'groupA' group is in the permissions, change it to 'groupB'. Otherwise ...
ImACarrot's user avatar
-3 votes
1 answer
80 views

Does chgrp -p exist? [closed]

Does any version of the chgrp command have a -p option? If so, what does the -p option do? I am aware of the -P option. Example usage: chgrp -p folder group where folder is a folder and group a group....
Osvald Laurits's user avatar
6 votes
2 answers
2k views

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/...
pacoverflow's user avatar
1 vote
1 answer
713 views

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 ...
zilcuanu's user avatar
  • 135
0 votes
1 answer
67 views

is there a preference when using chgrp or chown for named or numeric args

When using chgrp or chown I see zero used quite frequently as the named group or user, instead of root. Is there a preference for either? And in what use case is the numeric arg preferable?
sbarlster's user avatar
0 votes
1 answer
224 views

How is it possible to set a directory permission, so the group can both read and write files in it? (Regardless who created a file)

I created a directory, which is owned by the www-data group. I would like to make the files in it writeable by the members of the group, no matter who created the file. My username is pi. I tried it ...
Iter Ator's user avatar
  • 101
0 votes
0 answers
107 views

same NAS, same folder, but different groups showed in two different hosts, why?

I have a strange behaviour with a shared NAS between multiple hosts. Every host reaches a shared folder mounted on /sharedfolder on the same source (##.###.###.###:/filesystem, where ## are the ...
Alessandro C's user avatar
2 votes
2 answers
1k views

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--. ...
achille's user avatar
  • 203
5 votes
4 answers
6k views

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 ...
Jojo's user avatar
  • 155
0 votes
1 answer
12k views

Use AD Groups Instead of Linux Groups

On our file server, we are using a bunch of Linux groups that are still in use and need to be replaced by their counterparts in AD. The groups in AD and /etc/groups have an identical name, so, (I'm ...
tightasbzip2's user avatar
0 votes
1 answer
35 views

How to operate on a directory with different owner from a script?

Few days ago i have installed elasticsearch, For diagnosing some problems on my elasticsearch setup, i have checked the logs files located in /var/log/elasticsearch and tailed them but apparently the ...
JammingThebBits's user avatar
0 votes
1 answer
201 views

Mounting a filesystem with gid=501 or chgrp filesystem after mounting

Is there any difference between mounting a filesystem with gid=501 mount option vs chgrp 501 $fs after it's mounted? I want to know if mounting with gid mount option buys me anything that chgrp (as ...
Gregg Leventhal's user avatar
0 votes
3 answers
3k views

What "chgrp 0" do?

I am analyzing one script and I cannot find online what chgrp 0 mean in the following line: find $1 -follow -exec chgrp 0 {} so find $1 takes parameter, -follow causes find to follow symlinks, -...
spaceman117X's user avatar
0 votes
1 answer
2k views

How to change the owner and group of a directory by the name of that directory?

I have a Ubuntu 16.04 Nginx server environment with several CMS (WordPress) websites under document root. All the site directories have www-data as owner and group, recursively. According to some ...
Arcticooling's user avatar
1 vote
4 answers
217 views

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 ...
maaartinus's user avatar
  • 5,059
21 votes
1 answer
28k views

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's user avatar
  • 13.2k
13 votes
4 answers
3k views

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 ...
GhostCat's user avatar
  • 250
1 vote
1 answer
644 views

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? ...
John Militer's user avatar
1 vote
1 answer
150 views

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 ...
Vsh Fbvsfvs's user avatar