LinuxQuestions.org
Review your favorite Linux distribution.
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 03-30-2004, 09:05 PM   #1
timsch75
Member
 
Registered: Feb 2004
Location: austin, TX
Distribution: slackware 10
Posts: 169

Rep: Reputation: 30
chmod fails to do what I expect


I've been trying to access my /windoes partition as user and cannot. I've tried to change that as root using chmod as follows:

root@rain:/home/tim# chmod 777 /windoes
root@rain:/home/tim# ls -l /windoes
total 1181280
drwxr--r-- 3 root root 8192 Mar 20 11:26 BJPrinter
drwxr--r-- 9 root root 8192 Mar 24 18:05 Documents and Settings
drwxr--r-- 4 root root 8192 Sep 24 2003 MATLAB6p1
drwxr--r-- 2 root root 8192 Feb 14 18:35 My Music
dr-xr--r-- 45 root root 8192 Aug 14 2003 Program Files
drwxr--r-- 4 root root 32768 Aug 14 2003 Recycled
drwxr--r-- 4 root root 8192 Feb 9 19:18 Temp


Yet the result is:

tim@rain:~$ cd /windoes
-bash: cd: /windoes: Permission denied


I must be missing something....


tim s
 
Old 03-30-2004, 09:16 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,004
Blog Entries: 11

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
Have a search for
windows fstab permissions user

(or the like if it doesn't quite provide you
with the thread that really does it :})


Cheers,
Tink
 
Old 03-30-2004, 09:26 PM   #3
eccles23
Member
 
Registered: Jun 2003
Location: Australia
Distribution: Gentoo/kernel 2.6.2
Posts: 45

Rep: Reputation: 15
yeah - my understanding is that the permissions/ownership that a volume is mounted with cannot be overridden with the chmod command.

um... well when you think about it it's a windows filesystem isn't it? so I doubt that the drive would even have any way of making the changes to or storing the permissions for the files... ie where would it store the info? windows file systems are just not set up for that kind of thing. so I think it gets some default permissions when you mount it (which you can control) and then that's it - you can't change it.

my advice would be

do:
groupadd winmount

then do:
usermod -G `groups tim | sed 's/ /,/g'`,winmount tim

(note the difference in quotes, some are straight and some are backquotes)

that will add you to the group winmount (and preserve the permissions)

then do:
grep winmount /etc/group | awk -F: '{ print $3 }'

to discover the group ID of the group you just made... and *then* add something like:

gid=xxx

to the list of options for mounting that drive in the fstab.

so what you are doing is:
adding a group
adding yourself to the group
mounting the drive as belonging to that group

and you may need to do a umask as well.
if the directories are not executable you won't be able to enter them
 
Old 03-31-2004, 12:10 AM   #4
timsch75
Member
 
Registered: Feb 2004
Location: austin, TX
Distribution: slackware 10
Posts: 169

Original Poster
Rep: Reputation: 30
problem fixed.

thanks, y'all. You're right tink, I should have searched. I'm usually good about that....
 
  


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
Expect how to? e-freak Programming 2 09-24-2005 05:49 AM
What can we do if we type chmod ugo-x /bin/chmod ?????? bunny123 Linux - Software 3 02-01-2005 09:53 PM
CHMOD in shell : chmod 777 /usr/ <---is that right? cpanelskindepot Programming 5 07-16-2004 06:37 AM
How to use expect TomCruise2002 Linux - General 0 10-02-2003 10:53 PM
expect sk8guitar Programming 3 07-29-2003 10:24 PM


All times are GMT -5. The time now is 07:42 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration