1

I want to be able to write to a folder.

I already changed the chmod 755 and the owner group, but it does not seem to work.

What other settings must be adjusted?

myName@homeserver /sharedfolders/media/Media % ll
total 64
drwxr-xr-x+ 308 nobody users 20480 Dec 18 18:42 Movies
drwxr-xr-x+  47 nobody users  4096 Nov  8 14:23 TvShows
myName@homeserver /sharedfolders/media/Media % id
uid=1000(myName) gid=985(users) groups=985(users),973(docker),998(wheel)
myName@homeserver /sharedfolders/media/Media % touch hello
touch: cannot touch 'hello': Permission denied
myName@homeserver /sharedfolders/media/Media % ls -ld .
drwxr-sr-x+  11 nobody users  4096 Mar 19  2020 .

% getfacl .
# file: .
# owner: nobody
# group: users
# flags: -s-
user::rwx
user:nobody:---
group::rwx
group:116:r-x
group:nobody:---
mask::rwx
other::r-x
default:user::rwx
default:user:nobody:---
default:group::rwx
default:group:116:r-x
default:group:nobody:---
default:mask::rwx
default:other::r-x

Jeff Schaller
  • 67,283
  • 35
  • 116
  • 255
A.Dumas
  • 435

1 Answers1

9

You need to give yourself write permission on the directory where you’re trying to create files. Since you want to use the group permissions for this,

sudo chmod g+w .

will do this for the current directory, and then

touch hello

should work.

Your chmod 755 command doesn’t set the group write permission bit; see Understanding UNIX permissions and file types for details.

Note that the + at the end of the permissions indicates that FACLs are set; you can check those with

getfacl .
Stephen Kitt
  • 434,908