Questions tagged [chown]

All about changing ownership of files.

Filter by
Sorted by
Tagged with
0 votes
2 answers
37 views

Mounting an external disk changes permissions on mount point directory

On Debian 11, mounting an external disk changes permissions on the mount point directory. The disk is formatted as ext4. Is this normal behavior? Create directory: user@debian:/media$ mkdir external2 ...
  • 437
1 vote
1 answer
80 views

Is there ever a good reason to add users to the "root" group?

There is much discussion online about creating sudo users and groups, editing the sudoers file, etc. For example, you might have sensitive configuration files or shell scripts, and you set the file ...
3 votes
2 answers
153 views

Can't `chown` with `unshare`

I run unshare -r touch file. However, unshare -r chown nobody file gives me Invalid argument. Why?
2 votes
1 answer
75 views

why chgrp or chown command causes file loss xattr

[root@localhost ~]# getfattr -m - -d /bin/tcpm getfattr: Removing leading '/' from absolute path names # file: bin/tcpm security.capability=0sAQAAAgAUAAAAAAAAAAAAAAAAAAA= security.selinux="...
0 votes
0 answers
24 views

I ran chown -R www-data / on root directory and everything broked. Help please [duplicate]

I thought that chown -R www-data / will change only my current folder.. but it run all over the server and now site is broken with 500 error. What was default chowner for root directory and system ...
0 votes
0 answers
43 views

How to expand the number of subuids for a linux namespace

After running something like this: $ unshare -rUm $ mkdir opt $ mount --bind opt /opt $ touch /opt/test $ chown 1000:1000 /opt/test I'm receiving this: chown: changing ownership of '/opt/test': ...
  • 1
0 votes
1 answer
35 views

Do group permissions matter for files owned by the root group?

I've stumbled upon a script which included the following two commands: chown -R some-user:0 /some/dir chmod -R g+w /some/dir Specifically, this is from the Dockerfile of the nginx-unprivileged Docker ...
  • 195
0 votes
1 answer
45 views

Why did chown mess up my sudo.conf?

My machine has 2 NVMe drives. During install, I loaded everything onto one of them and left the 2nd one untouched. I figured this would be a good way to learn about mounting drives after install. So I ...
-3 votes
1 answer
45 views

how to enable ownership of all devices? [closed]

The Linux security goes OVERBOARD when there is a single user , hardware never to be accessed by public , strictly home operation. Adding simple USB flash drive turns into exercise in futility... ...
  • 155
1 vote
3 answers
182 views

Script to CHOWN all the files in a dir but skip a specific dir inside

so i have this startup script i run after re OSing my server: Installs drivers Mounts Zpool Adds users and smb users and SMB shares. The only things that survives the new OS is my Zpool of which ...
0 votes
2 answers
192 views

Broke file permissions and can no longer load webpages on server

I noticed an unusually large number of SSH attempts on my server so disabled the root login for SSH, created a new sudo user and confirmed I was able to log in without issues and elevate myself to the ...
  • 61
0 votes
2 answers
441 views

Why does the 'chown' command does not work recursively using the '-R' flag for directories owned by the user nobody?

System: x86_64 Linux 5.13.19-2-MANJARO. I have a weird directory in '~/.local/share/Trash/expunged' which contains a few directories owned by the user nobody. I tried to execute the following command ...
1 vote
1 answer
43 views

a disk moved from an old computer requires a root user to be mounted, why?

I had a data disk on my previous computer (Debian 9) accessible to me, the user marc. Then I bought a new computer (Debian 10), and the reseller put that disk among others, that was immediately ...
  • 839
0 votes
0 answers
136 views

How to insert new users directories

I am trying to set up the directories on Ubuntu Server, Linux 4.15.0-162-generic #170-Ubuntu SMP using command chown user:group however, I have gotten an error like chown: invalid spec: ‘2163147:’ ...
1 vote
0 answers
27 views

Did I lose my files or are can I just not see them after installing Mint 20?

I have 2 HDD and I (maybe incorrectly) chose the format option when I installed the Mint 20. I was thinking that the files on the second HDD would be preserved. I can't see them after the upgrade. It ...
2 votes
1 answer
1k views

How can I change the permission of an external hard drive and access it?

I try to access an external hard drive with an ntfs filesystem from NixOS. Is it correct that I have to create a mounting point? Where do you usually create a mounting point? sudo mkdir -p /media/b/...
  • 81
1 vote
0 answers
36 views

Run clang-format from rootful container on bind-mounted host dir without changing ownership

I want clang-format run from within a container on a bind mounted host directory to keep the ownership of modified files. I have a simple Dockerfile which I'm running with podman. I bind mount the ...
3 votes
1 answer
288 views

Permissions of all files and directories in /usr

Oh my.. I just did a terrible mistake: chown -R root:root /usr. Mea [maxima] culpa.. I fixed sudo and pkexec already, but I want to be sure, there is no "sleeping" issue waiting on me in the ...
0 votes
0 answers
234 views

permission confusion when trying to tail logs

I would like to tail my radius logs with my user but I get the following: ron@OldNotebook ~ [1]> sudo ls -l /var/log/radius/radius.log -rw-r--r-- 1 radiusd radiusd 147918 Jun 22 15:04 /var/log/...
  • 33
0 votes
1 answer
243 views

Linux file permission confusion [duplicate]

My home folder contains 2 users. 1 admin users and 1 guest. I basically want a guest user not to be able to change the directory to a directory outside his own home folder when he logs in via SSH ...
0 votes
1 answer
252 views

Mounting the Drive to the Raspberry Pi and changing DIR ownership

so, after having followed this guide here https://pimylifeup.com/raspberry-pi-mount-usb-drive/ I've ended up with an automatically mounted external fat32 drive but now the ownership of that folder it ...
0 votes
2 answers
10k views

chmod to change permissions of specific user

I have two users, user1 and user2. I also have a file in /path/to/file. user1 should be able to have read-write access, while user2 should only have read access. I know that I can change permissions ...
  • 145
0 votes
0 answers
351 views

zfs chown error - operation not permitted - checked ACL and still not working

zfs filesystem - try to chown, but fail... root@tiny:/dancer# chown -R icetea:icetea chown: changing ownership of './Taipei Space Ships/Disk2/private/SONY/SONY.MPG': Operation not permitted try to ...
0 votes
1 answer
107 views

Chown silently failing

I've got a Raspberry Pi configured to run a MySQL database using MariaDB. To ensure that I don't run out of space I want to move the data directory to an external USB hard drive. I followed an online ...
1 vote
0 answers
33 views

setfacls and groups showing under Windows Advanced permissions

I'd love to find out what I am doing wrong here. I have a samba member server connected to a Windows AD environment sharing out a test folder. The end goal is to manage all permissions from windows as ...
  • 11
0 votes
1 answer
42 views

is there a preference when using chgrp or chown for named or numeric args

When using chgrp or chown I see zero used quite frequently as the named group or user, instead of root. Is there a preference for either? And in what use case is the numeric arg preferable?
0 votes
1 answer
350 views

Setting permissions on files and folder - is folder perms inheritance always implicit?

Objective: Creating a folder on the root, chown to group and add users to group - but users get too wide permissions! Consider the following: # as root # we need a user group groupadd team1 # we ...
  • 477
0 votes
0 answers
32 views

Being owned by chown [duplicate]

The terminal excerpt is pretty much self-explanatory. I'm logged in as root (for illustration purposes only!), I want to change ownership of a file on a mounted NTFS partition, and it doesn't work. ...
-1 votes
1 answer
394 views

Can an admin undo the limitations of a chmod 700?

Please help me understand how Linux works in this respect. I set up a samba fileshare on a raspberry pi and created a user account as well as a directory for a new user. I then used chown and chmod ...
0 votes
1 answer
107 views

How is it possible to set a directory permission, so the group can both read and write files in it? (Regardless who created a file)

I created a directory, which is owned by the www-data group. I would like to make the files in it writeable by the members of the group, no matter who created the file. My username is pi. I tried it ...
  • 101
0 votes
1 answer
53 views

Why do I have both root and mongodb permisssions?

These are permissions total 8 7351455 drwxr-xr-x 2 mongodb mongodb 4096 авг 21 10:36 . 7340101 drwxr-xr-x 69 root root 4096 сеп 4 11:40 .. for my /var/lib/mongodb I am having problem with ...
2 votes
0 answers
92 views

setgid being ignored by application

I run a Weblogic installation on a Oracle Linux Server 7.8. An application in weblogic will write some files to a local directory as output. The application uses the Oracle Weblogic FileAdapter for it....
0 votes
2 answers
624 views

Trying to copy using Sudo user

I have a "SuperUser" which has write permissions to /opt/example folder. I have a regular user named "user" which has read permissions to /opt and "user" has a directory /...
0 votes
2 answers
329 views

Changing ownership of a directory

I am trying to change the ownership of a directory to a certain group. I execute getent group and I see that the group I'm interested is in there - sudo:x:27. Now I am executing chown in the following ...
1 vote
0 answers
386 views

Cannot change ownership in SSHFS/FUSE

I encounter permission denied when trying to change the owner using chown of a folder on mounted SSHFS: # /etc/fstab sshfs#ubuntu@my.remote.tld:/mnt/data /data fuse user,_netdev,nonempty,...
1 vote
1 answer
527 views

Unable to write to mounted dir (after chown)

I've mounted a samba share to /mnt/nas with an fstab entry. I can read everything, but sudo is required to write to it (permission denied on touch test.txt but not sudo touch.txt). I tried: chown -R ...
  • 791
1 vote
1 answer
1k views

Chmod is not working on ntfs-3g partition

my chmod doesn't work properly. I just reinstalled my manjaro distro (formated only the root, non the /home). This folder resides on a ntfs partition (I already have ntfs-3g installed), I only need to ...
0 votes
1 answer
915 views

How to change ownership for the directory on the mounted disk?

The disk partition /dev/sda7 was mounted on /media/debian/8eda3aeb-e21b-455f-bb7a-f46005fb4893,i want to change ownership for the directory /media/debian/8eda3aeb-e21b-455f-bb7a-f46005fb4893/mydoc, ...
  • 219
0 votes
0 answers
266 views

Chown & Chmod commands returning Operation not permitted on Hard Disk [duplicate]

I have a raspberry pi 3b+ and am unable to change/give permissions to an external hard disk I've connected to it. A similar question is: chown command returning Operation not permitted Also I've ...
0 votes
5 answers
320 views

How to dynamically change owner of directory using awk output?

What I want to do : Takes user & their home directory list from /etc/passwd use the username and home address as parameters and change ownership of those directory to that user. Current outputs: ...
0 votes
2 answers
255 views

Find specific folders and then change their ownership

I'm running into security issues with multiple Wordpress websites, and I need to recursively change the ownership (and permissions) for folder "wp-content" (and whatever is inside them). I ...
0 votes
1 answer
38 views

Single user box, do user groups matter?

I have a single user box that I have setup as a home server. I'm the only one that ever logs into it, and will be the only one to ever log into it. I tend to chmod 755 for most files/directories and ...
  • 429
0 votes
1 answer
231 views

Way to do a recursive chown avoiding any SELinux violation

in script a.sh: chown -R root:group parent-folder/ chown -R root:group parent-folder/* The script runs as root user. When chown gets executed it show below SELinux violations: chown : type=...
  • 1
0 votes
1 answer
98 views

Group permission denied

Good time of day, my dear friends. I've got a user "http" with group "http", a dir "drupal-8.8.5" inside /home/yasuostormrage with 777 permissions for yasuostormrage:http, but there's a problem: user ...
0 votes
1 answer
225 views

Can't login after chown command [duplicate]

I just installed elementary OS dual booted with windows 10. After the installation. I saw that the / root directory has every file and folder locked. I can't rename, delete or create anything there. ...
  • 3
0 votes
1 answer
167 views

auditd / auditctl: Are chown and chmod “write” -w type of an operation?

Are chown and chmod “write” -w type of an operation? I'm using auditd to watch folder permissions. There are different options read, write, execute, attributes. I just want to watch chmod or chown ...
-1 votes
1 answer
411 views

How can I revert accidentally changed file ownership [closed]

I did cd /home; sudo chown -R my-user-name: ./ on Ubuntu 14.04. ls -lF /home total 20 drwxr-xr-x 51 lord lord 4096 Apr 5 10:38 lord/ drwx------ 2 root root 16384 Oct 12 2017 lost+found/ How can I ...
  • 11
0 votes
1 answer
172 views

Files missing in GUI after recursive chmod or chown

I was trying to set permissions on all of the files in a removable hard disk. I had tried chown and chmod on the disk address (i.e. /dev/sdb) but I still couldn't move files as a user. Then I tried to ...
  • 31
1 vote
1 answer
354 views

SUDO not found when calling inside a function in BASH script

I am trying to create a function in Bash that creates a directory, then sets the ownership, like this: create_dir() { local PATH=$1 local OWNER=$2 # create log directory echo -e "\n* Creating ...
  • 13
0 votes
1 answer
271 views

changing ownership on NFS shared ZFS storage - quota exceeded

I have very bizarre problem. I have CentOS server 6.10 and ZFS storage. Now storage is configured long time ago by someone, and I found out that for certain user there is a quota set. when I check on ...

1
2 3 4 5 6