Questions tagged [chown]

chown is a command is used to change the owner and/or group membership of a file or set of files.

374 questions
3
votes
0 answers

GitLab CI + Docker container and volume file permissions

I'm running a pipeline with GitLab CI, and I've set up a server with a runner, following GitLab's documentation (https://docs.gitlab.com/runner/install/linux-manually.html, and https://docs.gitlab.com/runner/register/index.html). The runner is set…
3
votes
2 answers

Getting error chown: invalid group: ‘nobody:nogroup’ while setting up an NFS server drive ownership permission

I am following this tutorial to export an NFS share drive. https://www.digitalocean.com/community/tutorials/how-to-set-up-an-nfs-mount-on-ubuntu-16-04#step-2-%E2%80%94-creating-the-share-directories-on-the-host I use centos7 as os. In tutorial,…
clockworks
  • 3,755
  • 5
  • 37
  • 46
3
votes
0 answers

How do I fix this: Error: /usr/local/Cellar is not writable? Why does chown returns "illegal username"?

I was trying to install Nodejs using Homebrew (I'm using macOS Sierra 10.12.6) so I wrote in the terminal: brew install node and it returned: Error: /usr/local/Cellar is not writable. You should change the ownership and permissions of…
Pier
  • 103
  • 1
  • 11
3
votes
2 answers

setting file ownership with mercurial

I am using mercurial as part of my workflow process and it is working well. I have one niggling problem though. When I pull from my central repository down to my Linux web server in order to make an upgrade, I'm doing it with the "root" user. That…
neomech
  • 303
  • 1
  • 5
  • 16
3
votes
1 answer

How to change file ownership using boost library?

I want to change file ownership using boost library, like chown(). Is there any api for this?
Jeremy
  • 65
  • 6
3
votes
1 answer

Is there an R function to change file ownership?

How could I change the ownership of files from R? I suppose I could use system and call chown directly against a string, but I am wondering if there is a better way.
wdkrnls
  • 4,548
  • 7
  • 36
  • 64
3
votes
3 answers

Unix: command for sudo-mv-chown combo?

I am operating as sudo in a system where I mv a great amount of files and dirs to and fro. Is there a command for the combo? $ sudo -i; # mv hello /home/other; # chown -R other:other /home/other/hello
hhh
  • 50,788
  • 62
  • 179
  • 282
3
votes
1 answer

Apache/CentOS 7: /var/www/html/ owned by root but created files owned by apache - how do I resolve this?

I have a fresh, unmodified install of Apache on CentOS 7. I notice that when I look at the folder permissions for /var/www/html it and it's content is owned by apache. When a file is created, however, its owner and group is Apache. Though html is…
tylersDisplayName
  • 1,603
  • 4
  • 24
  • 42
3
votes
6 answers

UNIX How to copy entire directory (subdirectories and files) from one location to another and retain permissions

I just copied an entire directory structure from one location on my server to another: cp -r /home/abc/public_html/* /home/xyz/public_html/ That worked fine. Except the dirs & files are now owned by root and the group is root as well. How do I…
H. Ferrence
  • 7,906
  • 31
  • 98
  • 161
3
votes
2 answers

GHCi - Haskell Compiler Error - /home/user/.ghci is owned by someone else, IGNORING

While trying to change the ~/.ghci file to my configurations this error appeared when I opened GHCi. GHCi, version 7.6.3: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... linking ... done. Loading package integer-gmp ... linking…
magamig
  • 414
  • 4
  • 14
3
votes
1 answer

Best practices in assigning permissions to web folders

I would like to know what is the best, correct and recommended way of doing chown and chmod to website files and folders. I recently started working on linux and I have been doing it in the site root directory like the following: sudo chown…
Jamol
  • 3,768
  • 8
  • 45
  • 68
3
votes
3 answers

How do I chown to inherit parent directory's owner and group or the current account user

In terminal I know I can chown whatever:whatever .* What I want to do is dynamically set username and group to the current domain owner rather than root. Is there an easy way to do this? Some background: I'm pushing to my server using Git as root…
user844621
  • 83
  • 1
  • 7
3
votes
1 answer

Monitor directory and change ownership of files upon creation

I have tried this method but it does not work... inotifywait -mr -e create /opt/freeswitch/storage/ 2>&-| sed 's/ CREATE //g' | while read file; do chown apache.apache $file done From command line inotifywait -mr -e create…
Arringar1
  • 395
  • 4
  • 9
  • 21
3
votes
1 answer

Dired: how to do chown as superuser?

I'm working on a code I checked from remote repository, where some of it went into that repo having "root" as the file owner. Now I want to move the directory containing the repo to another place, but deleting old files fails under regular user.…
user797257
2
votes
2 answers

Phing runs under user with limited permission

I have not used phing before, but would like to use it to automate my deployment process. Currently I log in under myuser, Apache runs under www-data. All my application code is owned by myuser, but other (cache) files are generated by www-data. I…
Jurian Sluiman
  • 13,498
  • 3
  • 67
  • 99