Questions tagged [chown]
All about changing ownership of files.
291 questions
0 votes
2 answers
126 views
Change the ownership of files in an external harddrive ntfs
ls -al /media/victor/Backup/ Output: insgesamt 25 drwxrwxrwx 1 root root 12288 19. Aug 13:49 . drwxr-x---+ 3 root root 4096 19. Aug 12:27 .. drwxrwxrwx 1 root root 0 19. Aug 10:43 DATA -...
1 vote
2 answers
165 views
How to get a safer chown?
I've encountered multiple cases where new Linux users accidentally run a command equivalent to sudo chown -R $USER:$USER / which silently destroys permissions for the whole system. (Often this ...
0 votes
0 answers
123 views
How can I set chown and chmod permanently, also for new files?
I installed texlive as usual in /usr/local/texlive/2025. When installing I typed umask 0027 prior to each command (./configure, make...), hoping that the resulting files would have root as owner and ...
0 votes
1 answer
296 views
Performance of chown and chmod or find and running in background in parallel?
I have up to terabytes of data (a large number of smaller files) that could contain wrong owner, group or permissions. To repair that we had a script doing sudo -n chown -R user:group "/path"...
0 votes
1 answer
117 views
user unable to write to media | Permission denied
I am having a problem utilizing a mounted drive on my Raspberry Pi 2B running Diet Pi. dietpi@DietPi:/media/dietpi/Other$ sudo chmod 666 -R /media/dietpi dietpi@DietPi:/media/dietpi/Other$ touch text....
-7 votes
2 answers
2k views
Assign file ownership in Linux
I want to assign file ownership in Linux. sudo chown (new owner) (file name?) What should I use for file name?
0 votes
1 answer
142 views
What does `sudo chmod -R a=,a+rX,u+w,g+w /data` do?
What does the following command do? sudo chmod -R a=,a+rX,u+w,g+w /data I understand that it changes permissions, but what exactly and how?
1 vote
0 answers
98 views
Show directory owner id instead of name via FTP (Filezilla)
I am setting up the directory permission of a fresh new linux Debian 12 server. I have added my user(uid=1000) to the www-data group. My commands are as below - sudo chown -R 1000:www-data public_html/...
0 votes
1 answer
358 views
Have drwxrwxrwx permissions on folder, but after mounting to it it becomes drwxr-xr-x which disalows members of the group to write. How do I fix it?
I have a folder under /mnt/ with drwxrwxrwx permissions and under root:root I then mount a USB drive (exFAT) to this folder and it becomes drwxr-xr-x The issue is that now I cannot scp to that folder ...
0 votes
1 answer
57 views
How to set back file ownership from a reference (/etc) directory to a copy on Linux?
Context : Debian 12 system recovery trial after a btrfs file system corruption (roots tree) with no backup but access to all(?) the files. I made a copy of the system after the corruption, everything ...
5 votes
1 answer
734 views
Root couldn't write to file with rw permissions for all users and owned by other user
I have script that can be runned from different users on the same machine. This script should write logs to the same file on every run. Minimal version of script: #!/usr/bin/env bash ...
2 votes
1 answer
764 views
chown cannot dereference, Permission denied
Given, touch /tmp/abc ln -vs abc /tmp/def $ ls -l /tmp/??? -rw-rw-r-- 1 ubuntu ubuntu 0 Apr 10 22:10 /tmp/abc lrwxrwxrwx 1 ubuntu ubuntu 3 Apr 10 22:10 /tmp/def -> abc Why I'm getting: $ sudo ...
3 votes
1 answer
1k views
Why does chown reset/remove the SUID bit and reset capabilities?
This command: sudo chown -R root:root directory will remove the SUID bit and reset all capabilities for files. I wonder why it's done silently and it's not mentioned in the man page. Weirdly the GUID ...
1 vote
0 answers
630 views
ACL always sets group execute permissions on files (Samba)
I have some users in the "sambashare" group and some in the "sambashareAdmin" group. Only users from the "sambashareAdmin" group are alowed to change/create stuff. All ...
0 votes
0 answers
53 views
Set group and mod of a new directory
I try to set for NEW created files/directories in /home/test: group to "test" right to "770" This works for the group (1). chown :test /home/test chmod g+s /home/test But I do ...