2022 Developer Survey is open! Take survey.

Questions tagged [chown]

All about changing ownership of files.

Filter by
Sorted by
Tagged with
0 votes
1 answer
26 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 ...
user avatar
-3 votes
1 answer
26 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... ...
user avatar
  • 137
1 vote
3 answers
79 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 ...
user avatar
0 votes
2 answers
111 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 ...
user avatar
  • 61
0 votes
2 answers
161 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 ...
user avatar
1 vote
1 answer
36 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 ...
user avatar
  • 729
0 votes
0 answers
94 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:’ ...
user avatar
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 ...
user avatar
2 votes
1 answer
295 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/...
user avatar
  • 81
1 vote
0 answers
24 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 ...
user avatar
3 votes
1 answer
182 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 ...
user avatar
0 votes
0 answers
130 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/...
user avatar
  • 33
0 votes
1 answer
163 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 ...
user avatar
0 votes
1 answer
174 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 ...
user avatar
0 votes
2 answers
6k 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 ...
user avatar
  • 135
0 votes
0 answers
262 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 ...
user avatar
0 votes
1 answer
65 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 ...
user avatar
1 vote
0 answers
28 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 ...
user avatar
  • 11
0 votes
1 answer
33 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?
user avatar
0 votes
1 answer
249 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 ...
user avatar
  • 467
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. ...
user avatar
-1 votes
1 answer
341 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 ...
user avatar
0 votes
1 answer
39 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 ...
user avatar
  • 101
0 votes
1 answer
43 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 ...
user avatar
2 votes
0 answers
84 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....
user avatar
0 votes
2 answers
128 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 /...
user avatar
0 votes
2 answers
211 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 ...
user avatar
1 vote
0 answers
314 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,...
user avatar
0 votes
1 answer
448 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 ...
user avatar
  • 749
1 vote
1 answer
822 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 ...
user avatar
0 votes
1 answer
511 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, ...
user avatar
  • 35
0 votes
0 answers
265 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 ...
user avatar
0 votes
5 answers
257 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: ...
user avatar
0 votes
2 answers
131 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 ...
user avatar
0 votes
1 answer
36 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 ...
user avatar
  • 429
0 votes
1 answer
184 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=...
user avatar
  • 1
0 votes
1 answer
88 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 ...
user avatar
0 votes
1 answer
172 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. ...
user avatar
  • 3
0 votes
1 answer
146 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 ...
user avatar
-1 votes
1 answer
301 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 ...
user avatar
  • 11
0 votes
1 answer
153 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 ...
user avatar
  • 31
1 vote
1 answer
304 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 ...
user avatar
  • 13
0 votes
1 answer
242 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 ...
user avatar
0 votes
1 answer
705 views

How create a folder owned by specific username & groupname?

In mac groupadd command does not work: After $ sudo mkdir -p /a/b, a$ ls -l total 0 drwxr-xr-x 2 root wheel 64 12 Jan 09:46 b a$ pwd /a a$ a$ a$ uname -a Darwin user01vl 18.7.0 Darwin Kernel ...
user avatar
  • 1,256
0 votes
1 answer
146 views

Change owner to a file when saved in a specific folder

I have a NAS with a directory for each member of my house. My user name, is member of each member's group. So I have access to folders of all users. I want, when I place a file, inside a user's ...
user avatar
  • 103
2 votes
2 answers
828 views

chgrp chown usermod are useless if not root?

I am logged under 'achille' achille belongs to 2 groups: groups achille achille: achille users I want to change the group owner of file 'tree.test' to group 'users' ls -l tree.test -rw-r--r--. ...
user avatar
  • 69
0 votes
2 answers
720 views

How do I make a directory part of a group?

I created a directory and the next step is to make that directory part of a group. Is this down with chown? Or another command? This is for my schoolwork. We have gone over permissions and changing ...
user avatar
  • 1
0 votes
0 answers
137 views

Why I get 2 different outputs for 'whoami' command in Linux?

I got here from StackOverflow because I couldn't find a solution there. Here is the link to the question. When I open terminal and type whoami I get m1ck0 which is my user. But when I enter whoami ...
user avatar
0 votes
1 answer
214 views

useradd account cant login through GUI

I'm using KALI fresh install. Linux kali 5.2.0-kali2-686-pae #1 SMP Debian 5.2.9-2kali1 (2019-08-22) i686 GNU/Linux I created a user using useradd akkilah Then i added this user to sudo group ...
user avatar
  • 23
1 vote
1 answer
38 views

Why does getegid work for others but not me?

I have the following test program: //File: egid_test.c #include <stdio.h> #include <unistd.h> int main(int argc, char** argv) { int egid = getegid(); printf("my effective group is %...
user avatar
  • 123

1
2 3 4 5 6