The chown command is used on Unix-like systems to change the owner of a file.

learn more… | top users | synonyms

1
vote
1answer
223 views

How to chown when a user name contains a dash?

A user and group contains a dash: abc-def. When I try to use chown I get an error: chown abc-def.abc-def * -R chown: invalid user: `abc-def.abc-def' the user is valid and it should work... how can ...
2
votes
2answers
224 views

Make files editable for guests without using chmod

Sorry if this is the wrong place to post this, or if it has been posted before. I couldn't find anything though. If I log on to a linux server without supplying a username or password (from windows ...
2
votes
2answers
273 views

Determing the Execution Environment of Apache

I am having this error: [Mon Dec 05 10:22:23 2011] [warn] mod_rewrite: Running external rewrite maps without defining a RewriteLock is DANGEROUS! [Mon Dec 05 10:22:23 2011] [error] (13)Permission ...
2
votes
2answers
750 views

How to give ownership to root without being root ? (needed for Apache)

I've got a PHP script that creates a folder on my server. This folder is supposed to be accessed via Apache, and users can view it online. Now if I create this folder while being root, everything ...
0
votes
1answer
719 views

chown, chmod & bad settings on /home/user/.ssh directory in fresh install of CentOS 6

I just finished installing CentOS 6 last night (netinstall from georgia tech repository), and have been running into some weird SSH issues when I try to SSH from the CentOS box (behind my home ...
2
votes
3answers
587 views

Cross-group file permissions in Linux

I have 2 users: Alice and Bob and 2 groups: Management and Personnel. Alice has primary group Management, and secondary groups Personnel and Alice. Bob has primary group Personnel and secondary group ...
0
votes
1answer
187 views

CentOS Directory Owner

I have a dedicated CentOS 5.6 Server for our webhost. I've setup FTP account in PLESK to access our website. Once I migrated joomla over I can not change/modify or upload new files via: FTP. I've ...
0
votes
2answers
58 views

creating user with limited access

I add a user on Application server using "useradd" command. /usr/sbin/useradd shantanu This user can connect to mysql service using the following command... mysql -h 10.10.10.111 -uroot -proot@123 ...
3
votes
5answers
7k views

is it safe to chmod 775/664 with owner www-data:www-data?

To make working with my webserver easiest I am proposing doing something like the following: sudo chown www-data:www-data /var/www -R cd /var/www sudo find . -type f -exec chmod 664 {} \; sudo find . ...
0
votes
1answer
58 views

Cent OS running Plesk 10

Like an idiot I was chown some files and did the command chown -R root:root / which as you can imagine has caused me some problems, i stopped it as soon as i could but i can no onger access plesk ...
2
votes
1answer
252 views

Setup Directory Permissions For Multiple Users To Read/Write

I am trying to figure out how to setup the permissions on a directory (/apps) so both the root user, and another user justin can read, and write into the directory. The user justin is part of the ...
1
vote
1answer
358 views

mysql.sock issue, chown mess and file permissions in LAMPP

I've made a mess on my server. I'm using LAMPP and I've created a new user apache:apache and assigned him to take care of the Apache. phpMyAdmin did not work due to that change so I had to chown the ...
2
votes
2answers
3k views

Limit sudo to only one directory and it's subdirectories by sudoers file

So I would like to limit Apache to only change permissions in a certain folder and all of it's sub-directories, so this is what I have in my sudoers file apache ALL= (ALL) NOPASSWD: /bin/chmod -R ...
0
votes
1answer
255 views

Pre/Post deploy script to change file ownership?

We are running CentOS 5.6 on a dedicated server. I am planning on deploying our Magento store changes using BeanstalkApp (www.beanstalkapp.com) which offers pre and post deploy hooks. My username for ...
1
vote
1answer
70 views

Change group owner of file, but not the owner

I want to make sure all directories and sub directories are of the group hgdata, but I do not want to change owner's (they are many different owners). The command chown -R will do the recursive ...
2
votes
4answers
342 views

Cannot login to Solaris due to chown on /usr directory

Someone ran "chown -R username /usr" and now I have no way of logging into the box to change it back. SSH has been disabled, X Server won't start so I have no graphical GUI, and the console login ...
1
vote
0answers
86 views

Cannot login to Solaris due to chown on /usr directory

Someone ran "chown -R username /usr" and now I have no way of logging into the box to change it back. SSH has been disabled, X Server won't start so I have no graphical GUI, and the console login ...
0
votes
2answers
42 views

User in group with r/w access does not actually get the read/write anything

I added my user to the www-data group. I chmodded a certain directory to 774 (-R, recursively) so only the owner and the group can change something. Yet my user can't even access it. What am I ...
2
votes
1answer
429 views

chown to a user I can sudo to

One of our users who has sudo privileges to multiple non-root users (role accounts for use with particular projects) would like to be able to change ownership of files among those users: e.g., if ...
0
votes
2answers
604 views

OSX chown problems after creating users with dscl

Alright, so I've made a user and a group using dscl as follows: dscl . -create /Users/deadline dscl . -create /Groups/deadline dscl . -append /Groups/deadline GroupMembership deadline Now I'm ...
1
vote
0answers
1k views

Lighttpd 403 Errors on HTML and PHP pages

I installed lighttpd on CentOS 5.5 64-bit. Everything seems fine and running except I cannot get past 403 errors on both HTML and PHP pages. I have used CHMOD and CHOWN, changed ownership in the ...
0
votes
2answers
1k views

Detect if Solaris has chown restricted

I am trying to chown a file, and I am getting a Not ownermessage bash-3.00$ uname -a SunOS host001 5.10 Generic_138888-03 sun4u sparc SUNW,SPARC-Enterprise bash-3.00$ id uid=60010(user1) gid=910(web) ...
3
votes
1answer
2k views

Only allow a user to CHMOD and CHOWN in their home directory or a specified directory

I have a Windows user on my network who has Samba access to our linux development server. Occasionally permissions or ownership will become confused for reasons unknown and he will no longer be able ...
0
votes
1answer
295 views

MySQL (local) owner and permissions

I asked this question on the MySQL forums and got no answer. I asked on StackOverflow and received a recommendation to try on ServerFault. So here I am. I recently successfully installed the 64 bit ...
2
votes
2answers
108 views

Unix Group Permissions

I have created a directory and chown to have permissions master:webmaster and chmod the folder to 775 hence group writeable. So why is it i bert as a member of webmaster cant mv the directory or ...
4
votes
2answers
15k views

chown on a mounted NFS partition gives “Operation not permitted”

I have a remote partition that i have mounted locally using NFS. 'mount' gives 192.168.3.1:/mnt/storage-pools/ on /pools type nfs (rw,addr=192.168.3.1) On the server i have in exports: ...
1
vote
3answers
811 views

chmod of 400,000 files inside multiple subdirectories?

Howdy... I'm looking to chmod 777 a whole bunch of files. Alternatively, since it's more secure, I could also settle for a chown www:www of these files to make them web accessible. Now, since I have ...
1
vote
1answer
364 views

How to use set-user-ID bit on directories?

I want all files in directory /home/alex/foo to be owned by alex, no matter who creates them. I'm trying this technique, but it doesn't work (on CentOS 5, under root): $ cd /home/alex $ mkdir foo $ ...
3
votes
2answers
3k views

root directory permissions changed to 777 by mistake whats now?

By Mistake on Ubuntu 9.04 my colleague has changed the permissions to 777 on root directory (/) whats the best way to recover the permissions ?
14
votes
2answers
635 views

Using dot (.) as delimiter to specify group in chown

I've always done: chown nimmylebby:admins file I see that this also works: chown nimmylebby.admins file Might seem like a silly question but I'm genuinely curious on how the latter works. It ...
1
vote
3answers
205 views

What is the purpose of executable file access rights in Linux?

I never understood this, because if you have access to read a file, doesn't that mean you would be able to copy it somewhere else, thus allowing you to execute it anyway? What am I missing?
1
vote
1answer
1k views

Used recursive chown on the root directory

Im gonna need some help restoring my ssh settings as i screwed everything up by calling this command: chown -R user / At the moment im not able to access the site through ssh/ftp since the ...
10
votes
5answers
14k views

How to Chown a directory recursively including hidden files or directories

Seems like chown with the recursive flag will not work on hidden directories or files. Is there any simple workaround for that?
0
votes
2answers
633 views

bulk swap uidNumber/gidNumber?

We currently have LDAP servers in Dev env. and staging/prod env. Both are not coupled and accounts are created manually. So the uids are same but the uidNumber and gidNumber are different across these ...
0
votes
3answers
148 views

What happens when a chown occurs on a file being written to?

Background: I have a cron job which chown's the directories of new users. More often than not, these users are already uploading files to the server before the job occurs. So will files successfully ...
3
votes
2answers
93 views

How can I reset the permissions of /bin /boot /etc and /dev to orignal owner, Ubuntu?

I accidentally changed the ownership of the /bin, /boot, /etc and /dev recursively to nobody:nogroup using chown when I misplaced a forward slash! How can I resort the original file ownerships? I've ...
0
votes
2answers
332 views

directory owner problem

I have a uploader using applet and jsp,so after it is uploaded the owner is tomcat so it is not accessible by php i mean apache. its throughs error.i changed chown in php and directly in shell access. ...
2
votes
2answers
771 views

Apache security for multi-user development web server

I've been searching and reading through documents all morning and understand that I need to use some combination of chown and probably 'jailing' to securely give programmers access to directories on ...
3
votes
2answers
730 views

www-data ownership makes the WordPress installation consume more memory

I have a WordPress installation. When the ownership of the folder is root, the memory consumed is okay. However, when I change the ownership to the www-data user, it starts consuming a lot of memory ...
1
vote
4answers
589 views

Chown root mistake

I accidentally executed the chown userx:userx / command. Is there a way to fix this in a gentle way? I know the mysql folder has to be owned by mysql:mysql. But what about the other folders? Are ...
1
vote
3answers
574 views

Joe's sad PHP permission problem (LAMP) [closed]

As many PHP servers as are out there you would think that there would more guides on this topic. Joe begins as the happy owner of a new ubuntu PC. Joe likes Ubuntu in his coffee. Joe wants to build ...
0
votes
1answer
1k views

CentOS 5.4 NFS v4 client file permissions differ from original files & NFS Share file contents

Having a strange problem with NFS share and file permissions on the 1 out of the 2 NFS clients, web1 has file permissions issues but web2 is fine. web1 and web2 are load balanced web servers. So ...
4
votes
2answers
7k views

what chmod and owner:group settings are best for a web application?

we are configuring a PHP web application on CentOS and have all our files currently in /var/www/html/project/ Apache is configured to run as apache:apache and has access to the directory above. Right ...
22
votes
8answers
4k views

accidently ran “chown www-data:www-data / -R” as root

i just ran this a few seconds ago, i managed to do ctrl-c as soon as i realized what i started doing. so far in the only dir its started going through is /bin im afraid to do anything else, so far ...
0
votes
2answers
4k views

when should I use “apache:apache” or “nobody:nobody” on my web server files?

Background: I remember at my old place of employment how the web server admin would always make me change the httpd-accessible file upload directories so that they were owned by apache:apache or ...
2
votes
1answer
5k views

Can't modify or chown files on readynas nfs share

I have a readynas with nfs sharing. I have a bunch of files that I can't write to on the share. They're owned by nobody:nogroup and if I try to chown them I get chown: changing ownership of ...
1
vote
1answer
462 views

OpenSolaris user permissions and problems

I'm trying to achieve the following in OpenSolaris to setup permissions on the ZFS volumes (shared using CIFS). There are some users who should belong to the sysusers group, they have access to ...
8
votes
7answers
21k views

Chown operation not permitted for root

I try to chown the owner of a file to root, but I can't. I'm doing this as root. I get the following message: chown: changing ownership of `ps': Operation not permitted