Skip to main content

Questions tagged [chown]

The chown command shell of a Unix-like operating system (such as GNU / Linux) is used to change the owner of a particular file.

2 votes
2 answers
1k views

root cannot chown /mnt directory

I have a got a USB key with some directories on it. All files belong to root. whoami root id uid=0(root) gid=0(root) groups=0(root) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 ...
achille's user avatar
  • 137
0 votes
1 answer
57 views

Messed up with /dev/tty* ownership

I was flashing a Flipper Zero Wifi Dev Board and I needed to have /dev/ttyACM0 owned by dialout group... The thing is now I have tried to revert the stuff, making a chown root:tty /dev/tty*, and chmod ...
DaniWein's user avatar
0 votes
0 answers
65 views

Possible in Linux for root to take ownership of a running process without restarting it?

There is a process running under my personal login id that I want to run under root instead. This is only temporary for troubleshooting a problem with it. My login id has sudo privilege but is not ...
bgibson's user avatar
  • 103
0 votes
3 answers
887 views

Why is it possible to assign non-existent users as file owners via the "chown" command?

Why is it possible to assign non-existent users as file owners via the "chown" command? To give you an example sudo chown 03:03 ./test/f2 ls -l -rw-r--r-- 1 3 sys 0 nov 7 17:45 f2 ...
Felix121's user avatar
0 votes
0 answers
250 views

cygwin /usr/bin/install cannot change permissions

When I run /usr/bin/install, I get permissions errors: bifrost ~ 857# groups None Local account and member of Administrators group tsysadm Administrators Users NETWORK Authenticated Users This ...
Erik Bennett's user avatar
0 votes
1 answer
704 views

how to change user and group of a file inside the docker in gitlab-ci

I have a file which when I mount it to the docker, the user and group will change. root@b2d3cb9b2aab:/# ls -lh /etc/logrotate.d/ total 36K -rw-r--r-- 1 root root 120 Sep 11 2021 alternatives -rw-r--...
Amir's user avatar
  • 577
2 votes
0 answers
3k views

Run script with root permission as normal user

Problem: How can I run a script owned by root with root permission as normal user? Let's take for example a folder /path/to/folder. First I make sure that the folder and all content is owned by root: ...
ningelsohn's user avatar
0 votes
1 answer
2k views

Change the ownership of all files & folders based on search result

I know how to find all the files & folders owned by a specific user, say tommy: find / -user tommy But how can I chown the files & folders to another user, say peter? I know I can change ...
Raptor's user avatar
  • 1,090
1 vote
1 answer
439 views

What does it mean to chown a directory non-recursively?

You can do either chown $user $path or chown -R $user $path. What's the difference when $path is a directory? The second invocation would also chown all files and directories inside $path recursively. ...
Noein's user avatar
  • 151
0 votes
0 answers
50 views

Using sgid bit on specific executable files to filter their traffic with iptables

I'm trying to filter traffic with iptables for specific applications by their effective owner id (--gid-owner). For this purpose I've created a group $ sudo addgroup net-user , set this group on an ...
raacer's user avatar
  • 573
0 votes
0 answers
180 views

Mistake - sudo chown -Rh not-root-user /

Well that. Made a terrible mistake on ubuntu server 18.04 (production server) and ran chown -Rh some-not-root-user / Now sudo is not working. Is there any way to reverse this?
Legna's user avatar
  • 101
0 votes
0 answers
572 views

Is it safe to change ownership of several sub directories in /usr/local on MacOS Big Sur?

When trying to install some support for FORTRAN on my macBook running Big Sur and using brew I get an error that some /usr/local folders are not writeable and am asked to use chown to change ownership ...
Nate Lockwood's user avatar
0 votes
0 answers
373 views

How do you set read-only in NFS without root privilege on Linux?

This seems like a relatively straightforward question, but I couldn't really find an answer to this on knowledge bases. Problem I want to protect some files so they cannot be edited, deleted by other ...
boomkin's user avatar
  • 101
0 votes
1 answer
248 views

Recover Ubuntu file owners after improper use of chown

I made the mistake of changing the owner with the command sudo chown -R userG: userG / Now MySQL and other things not working, I try to repair but the ** sudo ** command does not work Give this error ...
sutanejo 's user avatar
0 votes
2 answers
2k views

chmod/chown/mkdir: Operation not permitted as root

I get Operation not permitted for root user on one server but not on the other "identical" server. Running on Amazon Linux 1. Server 1: [root@preprod-1 ]# chown root:root /s3mnt/outliers/ ...
masterpiece's user avatar

15 30 50 per page
1
2 3 4 5
9