I installed high sierra on a new machine and then copied over some directories inside my home from my time machine external disk.
The backup was created with another machine and os version from a user having the same name of the one recently created on the new installation.
90% of the things went ok.
For unknown reasons some subdirectories of my home (copied from the backup) are not writable.
I have tried every possible combination of chmod commands, and in theory everything should work correctly:
- cmd+i, general:
- item not locked
- item not shared
- cmd+i, sharing and permission:
- myuser: Read and Write
- staff: Read Only
- everyone: Read Only
stat
shows:- Access: (0755/drwxr-xr-x) Uid: ( 501/ myuser) Gid: ( 20/ staff)
- 501 is the correct id my current user
I think it's not a unix permission problem as the permissions should work as is.
I've also tried chflags nouchg my_folder
with no luck.
Not sure what could cause this.
Best Answer
Write permission could be blocked by file/folder modes, user flags, non-ownership, Access Control Lists (ACLs) and/or extended attributes. Below are some commands which can fix these types of errors.
You can recursively change the folders mode to 755 (drwxr-xr-x) by using the command given below.
You can recursively change the regular files mode to 644 (-rw-r--r--) by using the command given below.
You can recursively remove user flags by using the command given below.
You can recursively change user ownership of the files and folders by using the command given below.
You can recursively change the group of the files and folders to
staff
by using the command given below.You can recursively remove any Access Control Lists (ACLs) by using the command given below.
You can recursively remove any extended attributes by using the command given below.
Often searching for locked files and/or folders can be useful. Below is a command for this.