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.

Filter by
Sorted by
Tagged with
0
votes
0answers
17 views

Ubuntu 18.04 SFTP with users and one major user

I have an Ubuntu 18.04 system running and want to access this system using SFTP. I have a lot of users, that shall access /var/ftp/data/%u, additionally, I need a user f_sftp, that can access and read ...
0
votes
0answers
66 views

FTP User/Group permission on VSFTPD and UBUNTU

I developed a vsftp server with three user groups: g1, g2, g3. Each group has a folder with its name. For example. /home/server/g1 /home/server/g2 /home/server/g3 Each group also has users sudo ...
0
votes
0answers
21 views

File ownership preservation with setuid and setgid

I have a folder which have setuid and setgid set, like this: drwsrwsr-x 2 max testgrp 4096 mars 20 23:57 . I have also 2 users test1 and test2, members of testgrp group When I create a file with ...
0
votes
1answer
55 views

Linux auto chown web uploaded files to users folders

I have a home server that stores my files and I access the files in my internal network with samba. I have 3 users and each user has its home folder on /home/user. In order to access the files from ...
2
votes
3answers
609 views

How to automatically change permissions and owner:group on any file added to a specific directory?

I run an unRAID server (unRAID is based on Slackware) and would like to find a way to automatically change the permissions and ownership of every file added to a specific directory. Specifically, I ...
0
votes
1answer
46 views

Can I undo a `sudo chown -R /` on Mojave? [duplicate]

I ran a command that ended up executing as sudo chown -R / Can I revert / to default permissions?
0
votes
1answer
41 views

How do I stop a file changing groups when it is edited

My Debian LAMP web server has files in the website document root with owner:group set at [username]:www-data. When I edit such a file by connecting using sftp and using a text editor the group ...
1
vote
0answers
354 views

Mount a windows path (cifs) in a voulme of a docker image

I have a windows file server and an Ubuntu machine which runs docker. Inside this docker there is a Nextcloud container. The /var/www/html inside ther Nextcloud container is mounted as volume on the ...
0
votes
0answers
1k views

sudo chown - operation not permitted

I don't understand why I'm not allowed to change the owner of a folder as root user (the folder is mounted with a hard disk). root@raspberrypi:~# chown -R www-data:www-data /media/hdd chown: ...
0
votes
2answers
4k views

chown -R exclude some directory

I want to exclude some large content directory I'm Using it to chown Directory chown -R admin /home/admin/web/public_html is there anyway to exclude a subdirectory under html Like: chown -R admin ...
-1
votes
1answer
189 views

i need help reversing a chmod, chown and 'whoiam' code

I used this code on an app: chmod 600 /Applications/Freedom.app ; chown 'whoami':staff /Applications/Freedom.app Does anyone know how to undo this?
4
votes
3answers
10k views

chown: /usr/local: Operation not permitted

How should I fix this? Tue Oct 31 21:52:56 mona@dhcp-wifi-8021x-155-41-82-88:~$ brew update && brew upgrade && brew cleanup Error: /usr/local is not writable. You should change the ...
0
votes
1answer
723 views

Can't change owner of folders/files on thumb drive

I have a drive being mounted (either manually or automatically using usbmount) and I can't change the owner or modify the permissions on the mounted drive or folders/files within in order for Mono to ...
1
vote
1answer
933 views

How may I mount an external drive in fstab and give owbership to multiple users?

I mount an external drive on my Raspberry-Pi (Debian/stretch) and I mount my external drive in the fstab like this: UUID=1AD09862DC893951 /media/USBHDD1 ntfs-3g nofail,uid=pi,gid=pi,umask=007 0 0 ...
0
votes
1answer
400 views

Centos: Apache needs to read files created by Tomcat

After trying a lot of different solutions I came here for some help. I have a web apps in apache HTTPD which serve the frontend and a Java app in Tomcat in the same server. The thing is that the ...
0
votes
2answers
2k views

Ownership remains unchanged after `sudo chown` in ubuntu

sudo chown reports that it has changed ownership but stat shows that they remain unchanged. I have absolutely no clue as to what might be causing this behavior. Commands and their output are listed ...
0
votes
2answers
70 views

How to see when folder access permission is changed?

How to see when folder access permission is changed? The folder now has 777 permission and I want to know when chmod command is run for it. Is it possible? My OS is Ubuntu. Thank you.
0
votes
1answer
8k views

What is the effect of “chown nobody:nogroup”?

What is the effect of chown nobody:nogroup on a single file or directory and what is the effect on files within a directory?
0
votes
1answer
2k views

Setting up a local development environment with nginx on Linux (ubuntu)

I recently moved to a new computer, and copied over all existing git repositories for webdevelopment projects from my old computer. On that old computer, I had installed apache to serve certain ...
1
vote
1answer
992 views

Undo mistaken chown of /usr/bin on macOS Sierra

I made a huge mistake. I wanted to change permissions for /usr/local/bin, but changed permissions for /usr/bin instead. Now I can't use sudo and others. I tried to change it back, but operation is not ...
1
vote
1answer
700 views

linux permissions / chown vs ftp

I have (I guess basic) problems with Linux permissions/ownership. I have FTP user "ftp". Then I have all files on my server under different user "nginx". To make the websites work I need to have all ...
0
votes
0answers
428 views

cannot chown file as root

After mounting a NTFS or fat32 partition (not as readonly), I try to change it to my user permissions with sudo chown user: file However I am then told that the "Operation is not Permitted". I have ...
1
vote
2answers
4k views

How to fix broken “etc/sudoers” ownership on EC2?

Backstory: I was trying to get PHP to execute node, but ended up changing permissions / ownerships on probably more files and folders than I should of. At one point I stumbled upon someone's ...
1
vote
0answers
33 views

Logging into new FTP server, but no directories show up

I've tried this with both ProFTPD and SFTP. I'm trying to chroot a user to /var/www/user however when I log in to the FTP server with their account, I get "/var/www/user: No such file or directory". ...
0
votes
0answers
423 views

Best way to ensure the contents of a directory is always owned by Apache

We have a couple Apache VirtualHosts on a CentOS 7 server, and the PHP sometimes requires the ability to create/edit/delete files and/or folders, so it's important that the permissions always be ...
0
votes
2answers
650 views

How to use wilcards on chown command?

I need to use wildcards on chown command. Example: # chown app:demo /opt/app/users/*/demo I get the following error: chown: can not access "/opt/app/users/*/demo" ': No such file or directory But ...
0
votes
1answer
380 views

Change owner on its own directory

I have a script running with the user user1:user1, making operations inside a directory dir. At the end of the script, I would like to use chown to change the owner of the script to user2:user2 But ...
0
votes
1answer
118 views

Script asks for root password even it has executable permissions for everyone

I have a script with name "somescript", which has executable permissions for everyone (755) but when I try to run it with a non-root user it keeps asking root password. I even tried setting to 4755 ...
2
votes
2answers
2k views

Unix chown/give permissions to www-data and user

I have a user, 'joe', to whom I would like to grant permissions (for /var/www/html/) so that I can use ftp (with vsftpd) So I run this command: sudo chown -R joe /var/www/html/ And that goes well, ...
0
votes
0answers
70 views

Unable to change owner on a mapped drive directory

I am using a script to copy files from amazon instances to a network drive using rsync. After the file copy I am trying to change the owner of these transferred files but am not able to. What is the ...
0
votes
2answers
425 views

Confirmation prompt for chmod, chown

I'm just trying to add a confirmation prompt to a few linux commands like chmod and chown. I've tried to google this but I can't find much information on the topic. While searching I found out ...
2
votes
1answer
331 views

SSHFS mount marked all files as hidden

I ran chown -R me:me /opt/web/ftp-mounts/ which affected files on sshfs ftp mounts. The remote server hosts IIS based websites. I might have messed up the file permissions on the remote host. Now ...
1
vote
1answer
35 views

Is there any existing tool to recursively substitute the UID/GID by any other?

I used to own the UID #1000 on my personal computers as it is the default in most Linux distributions. On my new computer, I own a completely different UID (which I cannot change). I want to access ...
2
votes
1answer
339 views

How to chown file to containing folders owner

How would you go to chown a file to the containing folder's owner lets say I moved a file from /home/userA/folder/abc.bin towards: /home/userB/finalfolder/abc.bin How can I chown abc.bin to ...
2
votes
1answer
4k views

Why can't I use my newly created user with chown?

So I am attempting to create a new user and group, and then change ownership of a directory to that new user/group. However, when I do, chown comes back with an "illegal user name" message. Here's a ...
0
votes
2answers
514 views

chown -R root:root .* in /root performs chown on /

When running the command in the title from /root it somehow jumps up to / and changes ownership for ALLfiles, i only noticed because error messages for /proc popped up. Maybe i'm getting old but ...
2
votes
3answers
3k views

Why I can't access to this directory after that I use the chown command?

I am not so into Linux and I have the following problem. I have installed a LAMP environment of an Ubuntu Linux system dedicated to the develop (it is on my PC and it is not a production server). So ...
0
votes
2answers
1k views

chown not working on ext4 hard drive

I have a new 3TB internal hard drive and after writing some data to it I completely zero'd the drive using DD. I then created a partition table (GPT) in Gparted and created an ext4 partition. All went ...
0
votes
1answer
57 views

chown -R does not set permissions of files. only directories

Hello i am setting up a server nginx gives 403 Permission dinied. I found out that somehow the command chown -R root:www-data /my_directory only set the permissions of directories. When i use ls -...
0
votes
1answer
77 views

Make my custom program root

I have a custom program in C, that iterates trough a directory and writes a log file with the contents in my home. However, it cannot acces /var/log/ /etc/ and other root folders. How to change that? ...
0
votes
1answer
62 views

wubi chown mysql to the /host folder not working

I installed wubi in D: driver. Since I want to store mysql database folder in D: driver which has a lot more space than inside wubi. I copy /var/lib/mysql to /host/mysql then change the database dir ...
0
votes
1answer
61 views

Checking if specific user used chown on specific directories?

I recently granted one user sudo access rights on test server. This morning I see that server is screwed up. I see that owner rights where changed on many directories. For example many root ...
4
votes
2answers
17k views

Change default permissions for new files and folders

Every time I create a new file or folder in Linux, it is accessible for r/w by myself, not the group. I want to change my system setting such that every new file or folder will be automatically ...
1
vote
1answer
672 views

Is it possible to disable chmod/chown from sudoers for these specific directories /usr and /etc?

There has been two occasions where I have accidentally chmod-ized 777 the whole direcotry of /etc and it has forced me to come to the decision that I'd be better off to do fresh installation of OS (...
0
votes
1answer
76 views

Granting full rights on all files (owned by su) within certain directory

I got some trouble with a server situation, where i keep some configuration files in a sub-directory of a web project. Using my superuser account, i make changes to these files, which NetBeans commits ...
0
votes
0answers
98 views

Changing privilege rights on Arch Linux for a particular program

I am quite new to linux and have had issues surrounding every program that I install. Basically, anything that is placed outside of my home directory requires a sudo call prior to opening/executing. I ...
0
votes
1answer
390 views

Unable to retain any root created files and folders after warm reboot in linux

I installed and ran petalinux on zynq board. It runs perfectly fine and boot in around 3 seconds. To boot it this fast I had to do some configuration before compiling the source. The problem that I ...
0
votes
1answer
71 views

Ubuntu file ownership issue

I've got a problem with my forum platform being unable to install modifications, as it complains the "Packages" directory isn't writeable. It's chmodded to 0777, so it's not a permission issue, but an ...
0
votes
1answer
156 views

chown for files generated by a process running as root

I have a Fedora server running an application as root (via sudo). The users operating the application can extract data with "Save as" menu from inside the application. However, the generated files has ...
3
votes
2answers
22k views

chown: invalid user: ‘www–data:www-data’

I'm experiencing strage problem. I simple need to give permissions www-data to a folder chown -R www–data:www-data /somefolder chown: invalid user: ‘www–data:www-data’ grep www-data /etc/passwd www-...