Can't chmod +g on a directory

Steve Matzura sm at noisynotes.com
Tue Oct 15 19:33:26 UTC 2024


On 10/15/2024 11:30 AM, Colin Law wrote:
> On Tue, 15 Oct 2024 at 16:21, Steve Matzura<sm at noisynotes.com> wrote:
>> "jim" and "bob" are two directories in /home owned by root and in the root group. They both have subdirectories called uploads. /home/jim/uploads is owned by jim in the jim group and has protection mask 755 (drwx-rx-rx). /home/bob/uploads is owned by bob but in another group entirely, and its protection mask is 774 (rwxrwxr--). I want to change /home/jim/uploads to the same permissions as /home/bob/uploads, but whenever I "sudo chmod +g /home/jim/uploads", nothing happens.
> chmod is just for setting the permissions for the group that owns the
> file.  If you want to change the group you have to use chown.
>
> Colin L.


Never mind, I figured out what I was doing wrong. The proper command is:


chmod g+w uploads


*NOT*


chmod +g uploads


Yes, it's chmod that does the job.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20241015/2c18d7c7/attachment.html>


More information about the ubuntu-users mailing list