All about changing ownership of files.

learn more… | top users | synonyms

1
vote
2answers
35 views

Why the S_ISUID and S_ISGID mode bits got cleared when the owner or group of an executable file are changed by an unprivileged user

I was reading the man page of chown. I don't understand why S_ISUID and S_ISGID mode should be cleared when the function returns successfully.
1
vote
1answer
54 views

Change file ownership, based on previous owner

I am a moderately new linux user. I changed my PC, and started using CentOS 7 from CentOS 6. So I attached my previous hard disk to my new pc to take backup of my files. Now, copying the files (and ...
3
votes
1answer
41 views

read only symlink or something similar? [duplicate]

I created myself a NAT for home use (Ubuntu+Samba+Greyhole+Apache+MySQL+other web server related stuff). 90% of files I store there are pictures that i really don't wanna loose (that's why Greyhole). ...
2
votes
0answers
46 views

Git pull in a linux environment changes the owner of the files

I am not sure if this is the proper forum to ask the question, but here it goes: Why will everytime I execute a git pull on my live server, the owner of the files be changed? I keep on manually doing ...
-1
votes
1answer
81 views

How to change file owner from root to apache?

I am using apache server on Linux fedora 17. I have one php code which creates a .ini file. If I create the .ini file by running php code through apache web server then rest php code files are able to ...
1
vote
1answer
22 views

Owner of directory set to 518?

I recently installed some PHP site on a server for a customer. A guy calls me up and tells me he can't seem to upload to the img directory. I went in and took a look at the owner of said directory. ...
0
votes
1answer
101 views

chown as non-root user [duplicate]

I tried to chown a file to root, that I own, But my machine says I'm not permitted. I've googled a bit and found a few topics that say chown is a root only command. But others say that's not true. Am ...
4
votes
2answers
234 views

Should /usr owner be root?

After having installed the MySQL database on openSUSE I realized that for all files in /usr/bin the owner was changed to the "mysql" user of the "mysql" group. Maybe there was some mistake of mine. ...
1
vote
2answers
608 views

Chown permission denied on owned dir

I have following directory (/usr/local) rwxr-xr-x. 43 root root 4096 Jul 25 14:19 . rwxr-xr-x. 14 root root 4096 Feb 21 10:27 .. rwxr-xr-x. 2 root root 4096 Jun 28 2011 bin [...] rwxr-xr-x 1 ...
2
votes
1answer
44 views

What do I need in my script to be able to change ownership of a directory structure that belongs to root to the current user running the bash script?

My bash script has the following section: su root -c chown -R smithb:other /export/home/smithb/workspace/rootownsit/ exit The directory rootownsit and its two sub directories were created and is ...
1
vote
2answers
82 views

scp and file owner

What are the reasons that could make a change in a file ownership after scp'ing it from one server to another? The file ownership changed from 'owner' to 'apache'. I used scp -p . The user 'owner' ...
17
votes
2answers
356 views

explanation on chown(1) POSIX spec

The POSIX spec for the chown utility mentions in its rationale section about the chown user:group syntax (formerly chown user.group) (emphasis mine): The 4.3 BSD method of specifying both owner ...
17
votes
1answer
911 views

If chown can change groups, why was chgrp created?

So there's chown which lets you change the owner and group of files and/or directories. But there's also chgrp which only changes the group. Why was chgrp created? Isn't it redundant?
0
votes
1answer
162 views

unable to chown a directory recursiverly “unknown user id”

I trying to chown the directory for changing the permissions of the directory. But it shows some error as unknown user id I tried to chown using the command : chown -R www-data [directory name] it ...
1
vote
1answer
80 views

Using kornshell or Perl to circumvent permissions needed by root

I have a problem where I need to change the ownership and permissions of one file that exists on more than 200 servers. I belong to 2 different groups and need to change the ownership from one group ...
3
votes
2answers
121 views

Solaris - Inheriting by files the user's ownership of directory

I have a directory with ownersip like user:group. I want to make on it something like sgid, but for user - all of new created files have a directory ownership. For example: drwxrwx--- 2 user group ...
4
votes
1answer
151 views

chmod doesn't work on folder 'd — — ---' permissions

In /var/www I've got a folder: d--------- 2 www-data www-data 4096 May 20 2012 update reported by ls -la. I'm logged in as root, but I can't change permissions or ownership. chown and chmod ...
1
vote
1answer
170 views

How to change permissions/owner or delete Downloads folder (owner: root wheel)?

Something strange happened with my Downloads directory on my Mac OSX v 10.7.5. All of a sudden I wasn't permitted to save anything to the directory. The directory is in users/kelly/ and is the only ...
7
votes
4answers
1k views

Will there be always a pair of same UID and GID?

I have to change file/directory's ownership using chmod .I know only owners's username but want to change default group name simultaneosly . At this stage group name is not decided so I am putting ...
14
votes
3answers
700 views

Move files and change ownership at the sametime

On Linux (Debian, Ubuntu Mint...), Is there any option command or something that I can use to transfer files to another user without having to do : sudo mv /home/poney/folderfulloffiles ...
2
votes
4answers
161 views

Easiest way to chown the contents of a directory?

I often use ls -ld . # remember current user and group chown -R user.group . chown remembered_user.remembered_group . Isn't there an easier way to recursively chown all files and directories in a ...
0
votes
2answers
203 views

Unable to access a folder through group permissions

In order to secure data on my webserver, I have moved the PHP includes to a folder called /var/www-includes (outside of /var/www, the server root). I also ran chown root:wwwadmin and chmod 770 on that ...
1
vote
1answer
59 views

Show who a file is chowned to?

To make things brief: I can chown a file with chown me:mygroup /tmp/file, but how can I see who a file is already chowned to? Something like chown --show-who mabey... Any clean way to see who is ...
2
votes
3answers
12k views

Create file in folder: permission denied

I'm a newbie in the GNU/Linux-Ubuntu world. I have a problem copying files to a directory on Ubuntu 12.04. I create a directory in the home directory so that the path where I want to copy to is: ...
-1
votes
2answers
378 views

Script to change ownership of files

I am new to unix. I want to write a script to change the ownership of files from root to myuser. Script which will check the ownership and if found as root will change it to myuser. The script should ...
2
votes
1answer
401 views

NFS Ownership/Permissions

I'm trying to get NFS working properly on a DD-WRT install using OTRW2. I can see and mount the share from the client. But when I do, the mounted folder changes it's owner to root:root and so my ...
1
vote
1answer
353 views

Granting permission for all users in a group to write to a directory and all its subdirectories

Trying out Linode for the first time, running an Arch Linux image, I successfully installed nginx as root. This, however, made /usr/share/nginx/html inaccessible to non-root users. Intuitively, I ...
2
votes
2answers
73 views

what is the difference in ownership order?

What is the difference on CentOS Linux if you chown apache:root or root:apache? I am trying to set correct ownership for Drupal install but both Drupal Docs and all subsequent pages of discussions ...
0
votes
1answer
2k views

how do I mount a CIFS share so I can fully control the mounted volume on the client

It's a simple question: but I am in much pain over this situation, so here is the question: How can I "mount" a share so that a) the share is run on boot b) that I can control things like chown/chmod ...
3
votes
2answers
275 views

Seems that chown is allowed to non root user

We are using LDAP authentication and probably another things that I did not understand well, in our company so maybe the following questions are result of this. I have found strange behavior of chown ...
2
votes
2answers
3k views

How to change file owner in AIX?

How can I change a owner of a file in AIX? I created a file using my personal account and then I tried to change user for this file: chown rootuser myfile.csv chown: myfile.csv: Operation not ...
0
votes
3answers
542 views

Create a file as a different user and group

I have a bash script with downloads some files, and then needs to set the owner to apache, and the group to a particular user group (that apache is not a member of). Is there a way to create those ...
1
vote
1answer
186 views

Problem with chown directory

i'm login with root account i want to chown my directory i do this: [root@sop /]# chown -R webadm:webgrp /ap/P12B/ I have this error: chown: changement de propriétaire pour `/ap/P12B/': Système ...
4
votes
1answer
194 views

Change owner of own directory

I am fully aware that a non-root user cannot change the owner of a folder to another user even if the user owns it unless they use sudo or have the CAP_CHOWN capability. Is there a way to grant a ...
2
votes
2answers
507 views

How to hide someone else's directories from a user?

I have several folders: /home/user1/ -u user1 -G user1 /home/user2/ -u user2 -G user2 /home/user3/ -u user3 -G user3 I created three users user1, user2, user3. Each user has own group. Any user can ...
0
votes
2answers
60 views

chowning each home user to itself recursively

Okay so I have about 100 directories in my home folder each owned by the home user itself. Sometimes I have to manually replace some files as root so the permissions are disturbed and some files are ...
2
votes
3answers
256 views

Safer way for granting permissions for self user?

I know sometimes we can do chmod 777 so we have a directory at our complete reach for accessing, reading and writing. But usually I prefer to do a sudo chown {myusername} {directory}. Obviously, the ...
1
vote
1answer
969 views

Safe to change owner of OS X system folders?

I'm trying to get Homebrew to work. That program's diagnosis tool gives me these suggestions: You should probably chown /usr/local/etc ... You should probably chown them: ...
5
votes
1answer
2k views

how to keep file owner same for newly created files

This question is regarding samba file access. I have created a folder A, and under folder A created two folders B and C. And also created three users A, B and C. User A has access to all three ...
1
vote
2answers
352 views

Unable to chown recursively

I'm using this command: chown root:www-data /var/www/example.com -R but I get an error message that the directory is not listed. What is wrong?
0
votes
3answers
773 views

Accidental chown under / as root

I accidentally run the following command as root chown mike -Rf / backups the point is that I added a space between / and backups my mistake, I stopped the command after 1-2 seconds, how can I recover ...
3
votes
2answers
2k views

What does `chown root.root $file` mean?

I'm trying to install colordiff in a custom directory because I do not have sudo privileges. I did make the directories hard-coded in the Makefile as stated in the README, but I'm getting this error: ...
1
vote
1answer
394 views

chmod and chown not working in sudo called script

Based on this Serverfault question, my git user has permission in sudoers to run a wrapper script to move files into my webroot with git. Everything is working fine except for the chmod and chown ...
20
votes
3answers
12k views

What are common rights for /tmp ? I unintentionnally set it all public recursively

I have abused sudo. I have created a really really short life temporary directory that I wanted to share between some users for a few hours... and I named this directory /some/path/tmp Unfortunately ...
1
vote
1answer
142 views

Able to delete file without permission [duplicate]

I've been experimenting with file permissions and ownership lately, and I tried this: touch a sudo chown root:root a sudo chmod 000 a I can't read, write, or execute the file, but I can still ...
3
votes
2answers
1k views

Taking file ownership when file and directory is readable/writable

I got some files in directory: drwxrws-wt 2 me mygroup 4,0K 10.1. 12:34 . -rw-r----- 1 someone mygroup 10G 10.1. 11:22 someonesfile me and someone are regular users without supplementary ...
8
votes
2answers
17k views

Mount cifs Network Drive: write permissions and chown

I have access to a cifs network drive. When I mount it under my OSX machine, I can read and write from and to it. When I mount the drive in ubuntu, using: sudo mount -t cifs -o ...
4
votes
3answers
187 views

How to prohibit from changing an owner of modifiable files?

I sometimes need to run a Qt Creator from root. After that, some config files of Qt Creator suddenly have a root as an owner. Therefore when running Qt Creator as user, I am getting nag warnings about ...
1
vote
1answer
201 views

security concern around adding cron user to web application group

I have a permissions issue on my CentOS 5.6 machine with regards to the cron user. On my test/staging environment my cron user (picco-cron) is a member of one group - picco-cron, as below: ...
1
vote
1answer
7k views

What is the equivalent for 'www-data' for CentOs?

CentOs doesn't recognise www-data but want to change ownership on my files folder. All my folders are owned by root at the moment. Confused as to what should be owned by apache and what she be owned ...