LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 05-09-2010, 09:53 AM   #1
cspearsall
LQ Newbie
 
Registered: May 2010
Posts: 8

Rep: Reputation: 0
chmod wont work


I am trying to change the /storage to 777. I am logged in as root and the owner of the directory is root, but no matter what I do it will only give me -drwx-xr-x and will not let me write or transfer files to this directory. Any suggestions.
 
Old 05-09-2010, 09:54 AM   #2
cspearsall
LQ Newbie
 
Registered: May 2010
Posts: 8

Original Poster
Rep: Reputation: 0
Also this is Centos if that makes a difference
 
Old 05-09-2010, 10:07 AM   #3
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
Hi and welcome to LinuxQuestions!

There is a chance the filesystem is mounted readonly, for some reason. Try the following to look at the current mount options:
Code:
mount | grep storage
Moreover, is this an external hard disk? What is the filesystem type?
Code:
df -T /storage
 
Old 05-09-2010, 11:34 AM   #4
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,990

Rep: Reputation: 69
Quote:
Originally Posted by cspearsall View Post
I am trying to change the /storage to 777. I am logged in as root and the owner of the directory is root, but no matter what I do it will only give me -drwx-xr-x and will not let me write or transfer files to this directory. Any suggestions.
I'm guessing that /storage is a mountpoint.

It may be that the mount options for the /storage filesystem don't allow other users to write to the filesystem, in which case the permissions displayed are correct and you won't be able to change them with chmod (which will only change the underlying directory in the / filesystem).

You can run the mount command (no arguments) to see the filesystem's current mount options, and you should be able to edit them in /etc/fstab. You need to add the "users" option to be able to write it for everyone, or the "user=name" option to limit to a specific user.

Hope that helps,

—Robert J Lee
 
Old 05-09-2010, 08:08 PM   #5
cspearsall
LQ Newbie
 
Registered: May 2010
Posts: 8

Original Poster
Rep: Reputation: 0
Mount command

/dev/sda1 on /storage type ext3 (rw)
/dev/sdb1 on /storage1 type ext3 (rw)
/dev/sdc1 on /storage2 type ext3 (rw)
/dev/sdd1 on /storage3 type vfat (rw)


results of the mount command
 
Old 05-09-2010, 08:16 PM   #6
cspearsall
LQ Newbie
 
Registered: May 2010
Posts: 8

Original Poster
Rep: Reputation: 0
chown

It would let me change the permissions when i changed the group and owner to nobody (not a very secure system but no biggie). But I would still like to know why that happened
 
Old 05-10-2010, 02:02 AM   #7
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,990

Rep: Reputation: 69
Quote:
Originally Posted by cspearsall View Post
It would let me change the permissions when i changed the group and owner to nobody (not a very secure system but no biggie). But I would still like to know why that happened
What are the permissions of the / directory?
Code:
ls -l /
 
Old 05-11-2010, 07:26 AM   #8
cspearsall
LQ Newbie
 
Registered: May 2010
Posts: 8

Original Poster
Rep: Reputation: 0
Changed a lot of stuff

The difference between this mount point and the others that I wasn't having problems with was the file system type. The others were ext3 and this one was auto. Maybe that had something to do with it?
 
Old 05-11-2010, 08:15 AM   #9
alli_yas
Member
 
Registered: Apr 2010
Location: Johannesburg
Distribution: Fedora 14, RHEL 5.5, CentOS 5.5, Ubuntu 10.04
Posts: 559

Rep: Reputation: 92
CentOS 5.4 should default to ext3 if I'm not mistaken (so setting to auto will result in an ext3 filesystem anyway)

Run the following command:

Code:
#df -T
This will show all your filesystem types - I'm pretty sure the filesystem has nothing to do with it.

Please post the output of:

Code:
#ls -la /
and

Code:
#ls -la /storage
Cheers
Yas
 
Old 05-12-2010, 09:25 PM   #10
cspearsall
LQ Newbie
 
Registered: May 2010
Posts: 8

Original Poster
Rep: Reputation: 0
ls -la
drwxr-xr-x 18 root root 4096 May 10 19:45 .
drwxr-xr-x 28 root root 4096 May 10 19:44 ..
-rwxr-xr-x 1 root root 1513 Nov 4 2009 anaconda-ks.cfg
-rwxr-xr-x 1 root root 11504 May 10 22:00 .bash_history
-rwxr-xr-x 1 root root 24 Jan 6 2007 .bash_logout
-rwxr-xr-x 1 root root 191 Jan 6 2007 .bash_profile
-rwxr-xr-x 1 root root 176 Jan 6 2007 .bashrc
-rwxr-xr-x 1 root root 100 Jan 6 2007 .cshrc
drwxr-xr-x 2 root root 4096 Nov 13 08:33 Desktop
drwxr-xr-x 2 root root 4096 Nov 13 08:33 .eggcups
drwxr-xr-x 4 root root 4096 May 10 19:45 .gconf
drwxr-xr-x 2 root root 4096 May 10 20:05 .gconfd
drwxr-xr-x 3 root root 4096 Nov 13 08:33 .gnome
drwxr-xr-x 6 root root 4096 Jan 7 13:48 .gnome2
drwxr-xr-x 2 root root 4096 Nov 7 2009 .gnome2_private
drwxr-xr-x 2 root root 4096 Nov 13 08:33 .gstreamer-0.10
-rwxr-xr-x 1 root root 81 Nov 13 08:33 .gtkrc-1.2-gnome2
-rwxr-xr-x 1 root root 4725 May 10 19:45 .ICEauthority
-rwxr-xr-x 1 root root 42756 Nov 4 2009 install.log
-rwxr-xr-x 1 root root 5904 Nov 4 2009 install.log.syslog
-rwxr-xr-x 1 root root 0 Nov 12 20:33 .lesshst
drwxr-xr-x 3 root root 4096 Nov 13 08:33 .metacity
drwxr-xr-x 4 root root 4096 Nov 13 08:34 .mozilla
drwxr-xr-x 3 root root 4096 Nov 13 08:33 .nautilus
drwxr-xr-x 3 root root 4096 Nov 14 19:43 .openoffice.org2.0
-rwxr-xr-x 1 root root 651 Jan 7 13:48 .recently-used
-rwxr-xr-x 1 root root 2639 Apr 10 17:00 .recently-used.xbel
drwxr-xr-x 3 root root 4096 Nov 13 08:33 .redhat
-rwxr-xr-x 1 root root 195 Nov 4 2009 scsrun.log
-rwxr-xr-x 1 root root 198 Nov 26 00:28 .serverauth.5101
-rwxr-xr-x 1 root root 129 Jan 6 2007 .tcshrc
drwxr-xr-x 4 root root 4096 Nov 29 18:43 .thumbnails
drwxr-xr-x 2 root root 4096 Nov 13 08:33 .Trash
drwxr-xr-x 2 root root 4096 May 10 19:45 .vnc
-rwxr-xr-x 1 root root 345 May 10 19:45 .Xauthority

ls -la /storage 3

total 60
drwxrwxrwx 7 nobody nobody 4096 May 10 19:56 .
drwxr-xr-x 28 root root 4096 May 10 19:44 ..
drwxrwxrwx 24 root root 4096 May 11 00:29 Applications
drwxrwxrwx 9 root root 4096 May 11 00:00 Books
drwxrwxrwx 2 root root 16384 May 10 19:52 lost+found
drwxrwxrwx 7 root root 4096 May 11 05:03 Personal Files
drwxrwxrwx 64 root root 4096 May 10 23:09 Pictures
 
Old 05-13-2010, 03:21 AM   #11
alli_yas
Member
 
Registered: Apr 2010
Location: Johannesburg
Distribution: Fedora 14, RHEL 5.5, CentOS 5.5, Ubuntu 10.04
Posts: 559

Rep: Reputation: 92
Hi

Quote:
ls -la
drwxr-xr-x 18 root root 4096 May 10 19:45 .
drwxr-xr-x 28 root root 4096 May 10 19:44 ..
-rwxr-xr-x 1 root root 1513 Nov 4 2009 anaconda-ks.cfg
-rwxr-xr-x 1 root root 11504 May 10 22:00 .bash_history
-rwxr-xr-x 1 root root 24 Jan 6 2007 .bash_logout
-rwxr-xr-x 1 root root 191 Jan 6 2007 .bash_profile
-rwxr-xr-x 1 root root 176 Jan 6 2007 .bashrc
-rwxr-xr-x 1 root root 100 Jan 6 2007 .cshrc
drwxr-xr-x 2 root root 4096 Nov 13 08:33 Desktop
drwxr-xr-x 2 root root 4096 Nov 13 08:33 .eggcups
drwxr-xr-x 4 root root 4096 May 10 19:45 .gconf
drwxr-xr-x 2 root root 4096 May 10 20:05 .gconfd
drwxr-xr-x 3 root root 4096 Nov 13 08:33 .gnome
drwxr-xr-x 6 root root 4096 Jan 7 13:48 .gnome2
drwxr-xr-x 2 root root 4096 Nov 7 2009 .gnome2_private
drwxr-xr-x 2 root root 4096 Nov 13 08:33 .gstreamer-0.10
-rwxr-xr-x 1 root root 81 Nov 13 08:33 .gtkrc-1.2-gnome2
-rwxr-xr-x 1 root root 4725 May 10 19:45 .ICEauthority
-rwxr-xr-x 1 root root 42756 Nov 4 2009 install.log
-rwxr-xr-x 1 root root 5904 Nov 4 2009 install.log.syslog
-rwxr-xr-x 1 root root 0 Nov 12 20:33 .lesshst
drwxr-xr-x 3 root root 4096 Nov 13 08:33 .metacity
drwxr-xr-x 4 root root 4096 Nov 13 08:34 .mozilla
drwxr-xr-x 3 root root 4096 Nov 13 08:33 .nautilus
drwxr-xr-x 3 root root 4096 Nov 14 19:43 .openoffice.org2.0
-rwxr-xr-x 1 root root 651 Jan 7 13:48 .recently-used
-rwxr-xr-x 1 root root 2639 Apr 10 17:00 .recently-used.xbel
drwxr-xr-x 3 root root 4096 Nov 13 08:33 .redhat
-rwxr-xr-x 1 root root 195 Nov 4 2009 scsrun.log
-rwxr-xr-x 1 root root 198 Nov 26 00:28 .serverauth.5101
-rwxr-xr-x 1 root root 129 Jan 6 2007 .tcshrc
drwxr-xr-x 4 root root 4096 Nov 29 18:43 .thumbnails
drwxr-xr-x 2 root root 4096 Nov 13 08:33 .Trash
drwxr-xr-x 2 root root 4096 May 10 19:45 .vnc
-rwxr-xr-x 1 root root 345 May 10 19:45 .Xauthority
The above is ls -la of the root home dir (/root) - please post the output of:

Code:
#ls -la /
Which is the root directory itself.

Thanks,
Yas
 
Old 05-13-2010, 07:22 AM   #12
cspearsall
LQ Newbie
 
Registered: May 2010
Posts: 8

Original Poster
Rep: Reputation: 0
ls -la /

total 182
drwxr-xr-x 28 root root 4096 May 10 19:44 .
drwxr-xr-x 28 root root 4096 May 10 19:44 ..
-rw-r--r-- 1 root root 0 May 10 19:44 .autofsck
drwxr-xr-x 3 root root 4096 Nov 11 22:05 bin
drwxr-xr-x 4 root root 1024 Nov 4 2009 boot
drwxr-xr-x 13 root root 3880 May 10 19:45 dev
drwxr-xr-x 108 root root 12288 May 10 19:54 etc
drwxr-xr-x 4 root root 4096 Nov 10 2009 home
drwxr-xr-x 11 root root 4096 Nov 4 2009 lib
drwxr-xr-x 7 root root 4096 Nov 4 2009 lib64
drwx------ 2 root root 16384 Nov 4 2009 lost+found
drwxr-xr-x 2 root root 4096 Mar 11 2009 media
drwxr-xr-x 2 root root 0 May 10 19:44 misc
drwxr-xr-x 2 root root 4096 Mar 11 2009 mnt
drwxr-xr-x 2 root root 0 May 10 19:44 net
drwxr-xr-x 2 root root 4096 Mar 11 2009 opt
dr-xr-xr-x 162 root root 0 May 10 19:43 proc
drwxr-xr-x 18 root root 4096 May 10 19:45 root
drwxr-xr-x 2 root root 12288 Nov 4 2009 sbin
drwxr-xr-x 4 root root 0 May 10 19:43 selinux
drwxr-xr-x 2 root root 4096 Mar 11 2009 srv
drwxrwxrwx 6 nobody nobody 4096 Nov 30 11:13 storage
drwxrwxrwx 7 nobody nobody 4096 Nov 30 00:43 storage1
drwxrwxrwx 5 nobody nobody 4096 Dec 1 13:06 storage2
drwxrwxrwx 7 nobody nobody 4096 May 10 19:56 storage3
drwxr-xr-x 11 root root 0 May 10 19:43 sys
drwxrwxrwt 17 root root 4096 May 13 04:02 tmp
drwxr-xr-x 15 root root 4096 Nov 4 2009 usr
drwxr-xr-x 25 root root 4096 Nov 4 2009 var
 
Old 05-13-2010, 07:24 AM   #13
cspearsall
LQ Newbie
 
Registered: May 2010
Posts: 8

Original Poster
Rep: Reputation: 0
this is after I changed the file system to ext3. It seemed to work, but I don't know why it wouldn't work before
 
  


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
Apache: difference between chmod 644 and chmod 666 and chmod 600 for output/txt/dat? frenchn00b Programming 6 04-22-2009 02:10 PM
wireless driver wont install,ethernet wont work Reanimator Linux - Newbie 4 05-05-2008 09:22 AM
chmod does not work? kalleanka Linux - Newbie 1 05-17-2007 11:51 AM
chmod u-x doesn't work? konstantinmiller Linux - Newbie 9 06-05-2006 11:26 PM
chmod doesn't work stonecrest Linux - Newbie 4 02-27-2005 05:43 AM


All times are GMT -5. The time now is 09:28 PM.

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