Questions tagged [chown]

All about changing ownership of files.

Filter by
Sorted by
Tagged with
0 votes
1 answer
29 views

Strange behavior of the mount dir when mount an EFI partition in a virtual block device (loop device)

In my WSL2 Debian distro, I created an image file named VirtDisk.img and set it as a virtual block device: dd if=/dev/zero of=VirtBlock.img bs=1G count=16 16+0 ...
0 votes
1 answer
34 views

How to keep ownership to same user for dir

I have two users,memsql and 4px. I have copied dir from 4px user, home dir to memsql user home dir. I want the permission for dir poc & singlestore1 to be memsql , memsql. Instead of memsql & ...
  • 127
0 votes
0 answers
27 views

Unable to jail sshd user to directory of external NTFS drive

I am currently running Raspbian Bullseye x64 on a Pi 4. I would like to create a user who is able to access a single directory on the Pi via SFTP. The directory must be on an external NTFS HDD The ...
2 votes
0 answers
53 views

Speed up chown for very large codebase

We have a scenario where we need to chown <group>:<user> on a LInux machine frequently for large sandboxes which contain thousands of directories/subdirectories, textfiles, object files, ...
  • 51
1 vote
3 answers
95 views

Is there any way to change file owner when some user modify the file?

For example, user1 create file. That file's owner is user1. if user2 modify that file's contents and save it. After that, file's owner changed to user2. is it possible? if possible how can do that? (...
0 votes
1 answer
69 views

replacing explicit user names with variables in mkdir and chown

What specific changes need to be made in the commands below in order to use a variable username and a variable user_home to create a subdirectory within the current user's home and then to change ...
  • 4,911
0 votes
1 answer
477 views

Does chown command allow to set group different from user group?

It may be a stupid question, but I don't understand a detail about the command chown. I haven't found any explanation for this detail yet, maybe because it's so obvious to everyone. When you change a ...
0 votes
0 answers
200 views

I can' t write anything in my mounted internal disk as user (and already tried chown and chmod)

The problem is I can't write, modify or delete inside a mounted disk. Lenovo E560. Debian 11/KDE. I have a 500GB connnected in the optical slot. It works fine with windows, but since I received a ...
0 votes
1 answer
21 views

change group ownership specifying from to for entire file system

I have 3 specific user accounts (less than 10 anyway), for all files & folders under a specific /data or /home directory, I want to change just the group ownership of all occurring files/folders ...
  • 5,205
1 vote
1 answer
119 views

My files are created with the wrong owner [duplicate]

In my case when I create a file or folder as user ludow the owner of the file or folder is root exemple ❯ whoami ludow ❯ touch test ❯ ls -al | grep test -rwxrwxrwx 1 root root 0 30 oct. 21:02 ...
  • 13
0 votes
1 answer
49 views

How do I have two group owners

I have a file where I want there to be not one but two groups who can have extra privileges to access it. But when I chown or chgrp it to a group it always erases the previous group. How do I add a ...
0 votes
2 answers
643 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 ...
  • 447
1 vote
1 answer
664 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
366 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
111 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
27 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
79 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
68 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
87 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
125 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... ...
  • 147
1 vote
3 answers
427 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
287 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
1k 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
96 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 ...
  • 907
0 votes
0 answers
184 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
3k 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/...
  • 91
1 vote
0 answers
68 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
478 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
454 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/...
  • 53
0 votes
1 answer
338 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
419 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
18k 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 ...
  • 165
0 votes
0 answers
514 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
184 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
45 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
55 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
573 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 ...
  • 487
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
499 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
191 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
83 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
124 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
2k 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
511 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
568 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
673 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 ...
  • 831
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 ...
  • 113
0 votes
1 answer
1k 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, ...
  • 285
0 votes
0 answers
268 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 ...

1
2 3 4 5 6