Questions tagged [chgrp]

chgrp is Change Group UNIX command.

The chgrp (from change group) command may be used by unprivileged users on Unix-like systems to change the group associated with a file system object (such as a file, directory, or link) to one of which they are a member. A file system object has 3 sets of access permissions, one set for the owner, one set for the group and one set for others. Changing the group of an object could be used to change which users can write to a file.

Syntax

chgrp [options] group FSO

Where:

  • The group parameter specifies the new group with which the files or directories should be associated. It may either be a symbolic name or an identifier.
  • The FSO specifies one or more file system objects, which may be the result of an expression like *.conf

Options:

  • -R recurse through subdirectories;
  • -v verbosely output names of objects changed. Most useful when "FSO" is a list;
  • -f force or forge ahead with other objects even if an error is encountered.
28 questions
1
vote
1 answer

Allowing single group having access permission of multiple groups

I would like to know one thing about linux (ubuntu) permission commands. I am having couple of user groups in my linux environment 1) www-data -> Created by nginx automatically 2) ubuntu -> Just for PHP uses Now both are having their own different…
Tom Inic
  • 41
  • 5
0
votes
0 answers

Can I access an Azure file share with non root user?

In this url https://learn.microsoft.com/en-us/azure/container-instances/container-instances-volume-azure-files, it says that: Azure file share volume mount requires the Linux container run as root . Azure File share volume mounts are limited to…
0
votes
1 answer

Is there an equivalent windows command for chmod?

I'm currently setting up a PHP app to run on my local machine (windows). The README describes the steps to run to set up the app on the production sever (linux). I've come accross these steps: mkdir var/cache/ chgrp apache -R var/cache/ chmod 770 -R…
pjs1000
  • 11
  • 1
0
votes
0 answers

Linux Mint 19.3 - chgrp/chown not working?

My apologies if I'm missing something obvious, but this is driving me nuts. I'm just trying to set up an sftp server and give the user group permissions on the folder indicated above by changing the group to sftp on the folder I want to share. I…
Holonet
  • 63
  • 1
  • 9
0
votes
1 answer

Why did "chown" and "chgrp" changed permissions of a directory? It is not a "chmod"!

Everything was good on my website. Then I ran this: root@[domain] [/home/[username]/public_html/[foldername]]# chown jaimemontoya -R webroot/ root@[domain] [/home/[username]/public_html/[foldername]]# chgrp jaimemontoya -R webroot/ What I was…
Jaime Montoya
  • 6,915
  • 14
  • 67
  • 103
0
votes
1 answer

PHP Script owner/group/permissions on non ".txt" filetypes

I need to change the permissions and owner / group on a series of files within a folder on an Apache server w/PHP 4. My script will change the info if it is of type .txt (text file). But will not chmod, chown, chgrp for files with an extension of…
Scott
  • 1
  • 2
0
votes
1 answer

Unable to save files to /var/www/html --even though I'm in group www-data

I want to keep root as owner of /var/www I want to make /var/www and /var/www/* accessible (rwx) by the group www-data. I believe apache's user is www-data. I added myself (user: devon) to that group, but I still cannot save a file to…
D3VON
  • 43
  • 1
  • 7
0
votes
2 answers

How can I make a chgrp command optional in my install script?

I'm creating an install script for a Linux game. As part of the installation, I change the suid permissions of the game executable to the "games" group so that the game can update the highscore file even when its run by regular users. Right now my…
hugomg
  • 68,213
  • 24
  • 160
  • 246
0
votes
1 answer

Directory - all permissions that belong in its group?

I have created group (lets call this user admin): sudo groupadd mygroup switched to user test (from admin user): sudo su - test cd /home/test/ mkdir external exit cd /home/test/ sudo chgrp -R mygroup external sudo usermod -a -G mygroup admin sudo…
Andrius
  • 19,658
  • 37
  • 143
  • 243
0
votes
1 answer

All files put into a folder "foo" by user "a" or "b" should belong to the "bar" group and only be visible by them

Pre requisite steps: Create two new user accounts "a" and "b" # useradd a # useradd b Create a group "bar". Create a directory "foo". # groupadd bar # mkdir /tmp/foo Task: All files put into the "foo" directory by users "a" or "b" should belong…
nmadhok
  • 1,704
  • 3
  • 16
  • 20
0
votes
0 answers

chgrp and chmod not working in cygwin (windows 8)

I work in "C:\Users\leyou\.ssh" I need to chmod id_rsa to 600 as it's currently 644, but it has no effect. Hence I tried "chgrp Users id_rsa" but it doesn't work neither and the group remains as "mkpasswd". Edit: The above happens in a windows…
leyou
  • 806
  • 1
  • 13
  • 25
0
votes
1 answer

Need to reboot Xubuntu to make chgrp work?

I recently noticed a fairly strange and for me unexpected behaviour in Xubuntu 12.04 and 14.04. I was doing the following: Testing if my user in in the group users, with groups $USER This is not the case by default. So I add my user to this…
Boris Däppen
  • 1,186
  • 7
  • 20
-1
votes
2 answers

How do I change owner and group owner of files and directories?

I want to change the owner and the group owner for all the files in the current working directories with a single line command. I don't want to have double line as follows; sudo chown you chgrp new_group some_file
1
2