LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-08-2012, 10:55 AM   #1
seriosbrad
LQ Newbie
 
Registered: Feb 2012
Posts: 3

Rep: Reputation: Disabled
Can't allow user write permissions to another owned directory


I have user1 that needs to write to a directory owned by user2 but I keep getting errors that user1 does not have permission to do so.

I have put both user1 and user2 in the same examplegroup.

user1 is writing out from a ramdisk onto the hard disk where user2 resides but I don't think this is an issue?

To sum it up:
I need to write from the ramdisk into a web directory in user2's public_html/subdirectory but user1 can't get the correct permissions despite being in the same group. All files in the the directory were recursively chmodded to 777

The OS is CentOS 5.7
 
Old 02-08-2012, 01:05 PM   #2
cbtshare
Member
 
Registered: Jul 2009
Posts: 619

Rep: Reputation: 42
After giving the permissions try issuing command 3 times so there'll be nothing in buffer:

Quote:
#sync
Is the group that both users are in able to write to users documents(has write permission). ls -l the folder where the files are an post the output.also please do
Quote:
cat /etc/group
to verify that they are in the same group/
 
Old 02-08-2012, 01:38 PM   #3
seriosbrad
LQ Newbie
 
Registered: Feb 2012
Posts: 3

Original Poster
Rep: Reputation: Disabled
ok here are the groups from running cat/etc/group


Code:
root:x:0:root
bin:x:1:root,bin,daemon
daemon:x:2:root,bin,daemon
sys:x:3:root,bin,adm
adm:x:4:root,adm,daemon
tty:x:5:
disk:x:6:root
lp:x:7:daemon,lp
mem:x:8:
kmem:x:9:
wheel:x:10:root
mail:x:12:mail,postfix
news:x:13:news
uucp:x:14:uucp
man:x:15:
games:x:20:
gopher:x:30:
dip:x:40:
ftp:x:50:
lock:x:54:
nobody:x:99:
users:x:100:
rpm:x:37:
dbus:x:81:
floppy:x:19:
vcsa:x:69:
utmp:x:22:
utempter:x:35:
slocate:x:21:
pcap:x:77:
rpc:x:32:
named:x:25:
mailnull:x:47:
smmsp:x:51:
sshd:x:74:
haldaemon:x:68:
ntp:x:38:
screen:x:84:
audio:x:63:
apache:x:48:
mysql:x:27:
seriosbrad:x:500:apache
distcache:x:94:
webalizer:x:67:
mailman:x:41:apache
dovecot:x:97:
postgres:x:26:
postdrop:x:90:
postfix:x:89:
clam:x:101:
baronsofbullshit:x:501:apache
baronsofbullshit.com:x:502:
tf2:x:503:
livemap:x:504:seriosbrad,baronsofbullshit,root
seriosbrad and baronsofbullshit are the user1 and user2 in my first post (root is in there just because i was testing)

seriosbrad needs to write into /home/baronsofbullshit/public_html/map

I ran
Code:
chown -Rv baronsofbullshit:livemap /home/baronsofbullshit/public_html/map
The chown applied, but I still don't have permission

Edit: forgot this

Output of ls -l
Code:
total 52
-rwxrwxrwx 1 baronsofbullshit livemap  893 Jan 30 02:43 config.js
drwxrwxrwx 3 baronsofbullshit livemap 4096 Jan 10 23:26 css
drwxrwxrwx 5 baronsofbullshit livemap 4096 Jan 20 16:54 faces
drwxrwxrwx 2 baronsofbullshit livemap 4096 Jan 10 23:27 images
-rwxrwxrwx 1 baronsofbullshit livemap  317 Jan 30 15:31 inactive.html
-rwxrwxrwx 1 baronsofbullshit livemap 2098 Jan 30 15:31 index.html
drwxrwxrwx 2 baronsofbullshit livemap 4096 Jan 10 23:27 js
drwxrwxrwx 5 baronsofbullshit livemap 4096 Jan 20 16:54 main
drwxrwxrwx 2 baronsofbullshit livemap 4096 Feb  7 09:07 standalone
drwxrwxrwx 8 baronsofbullshit livemap 4096 Jan 22 21:45 tiles
-rwxrwxrwx 1 baronsofbullshit livemap  630 Jan 30 15:31 up.aspx
-rwxrwxrwx 1 baronsofbullshit livemap  760 Jan 30 15:31 up.php
-rwxrwxrwx 1 baronsofbullshit livemap   33 Jan 30 15:31 version.js

Last edited by seriosbrad; 02-08-2012 at 01:42 PM.
 
Old 02-09-2012, 06:59 AM   #4
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: RHEL 7.x, SLES 11 SP2/3/4
Posts: 1,195
Blog Entries: 4

Rep: Reputation: 221Reputation: 221Reputation: 221
you have changed the ownership of a directory inside the home directory of user1 and by default any other user is not allowed to enter into another user's home directory so you need to give permission to user2 to enter into user1 home directory
 
Old 02-09-2012, 08:31 AM   #5
cbtshare
Member
 
Registered: Jul 2009
Posts: 619

Rep: Reputation: 42
I think it'd be much easier to restore permissions as they were so all is owned by baronsofbullshit and the group baronsofbullshit :

Quote:
chown -Rv baronsofbullshit:baronsofbullshit /home/baronsofbullshit/public_html/map

then

Quote:
gpasswd -a seriosbrad baronsofbullshit
this will allow seriosbrad to write to files baron creates in the future (once you done newgrp to move him to another group)...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
why can I remove files owned by another user in a directory of mine? melcataclysm Linux - Newbie 5 10-18-2009 07:06 AM
User Home Directory now owned bt Root AndeAnderson Linux - Newbie 4 10-09-2009 04:52 PM
Tiger checks Ubuntu get fail message root directory owned by user argh2xxx Linux - Security 2 10-20-2008 10:33 AM
Can you make any files and folders created within a directory owned by another user?? helptonewbie Linux - Newbie 13 12-14-2007 05:21 PM
.dmrc file being ignored, should be owned by user and certain permissions.. how do i? mitchell7man Ubuntu 8 04-25-2007 11:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:30 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration