Skip to main content

Questions tagged [chown]

All about changing ownership of files.

0 votes
2 answers
85 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 -...
birdman's user avatar
  • 407
1 vote
1 answer
123 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 ...
Luke's user avatar
  • 182
0 votes
0 answers
102 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 ...
Alexander Wittmann's user avatar
0 votes
1 answer
254 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"...
jan's user avatar
  • 105
0 votes
1 answer
94 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....
SpreadingKindness's user avatar
-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?
Werdna's user avatar
  • 1
0 votes
1 answer
118 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?
GaurangiS's user avatar
1 vote
0 answers
83 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/...
Prithviraj Mitra's user avatar
0 votes
1 answer
334 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 ...
Duxa's user avatar
  • 103
0 votes
1 answer
45 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 ...
lalebarde's user avatar
  • 275
5 votes
1 answer
690 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 ...
armoken's user avatar
  • 53
2 votes
1 answer
726 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 ...
xpt's user avatar
  • 1,904
3 votes
1 answer
936 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 ...
Artem S. Tashkinov's user avatar
1 vote
0 answers
596 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 ...
MrGlasspoole's user avatar
0 votes
0 answers
39 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 ...
chris01's user avatar
  • 1,009

15 30 50 per page
1
2 3 4 5
20