LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 08-02-2010, 01:00 AM   #1
WantLinuxHelp
Member
 
Registered: Jan 2009
Posts: 59
Blog Entries: 2

Rep: Reputation: 15
chmod fails without error


I have an external USB hard drive (sdb1) mounted at /media/Iomega HDD.

When I try to do a chmod to a directory on this drive, chmod doesn't give me an error, but it doesn't change the privs - even when I'm root. Why is this?


Code:
	root@d-desktop:/media/Iomega HDD# ls -lart
	total 2176732
	drwx------ 1 dan     dan            456 2010-08-01 16:24 Unison
	root@d-desktop:/media/Iomega HDD# chmod -v a+rwx Unison
	mode of `Unison' changed to 0777 (rwxrwxrwx)
	root@d-desktop:/media/Iomega HDD# ls -larth
	total 2.1G
	drwx------ 1 dan     dan      456 2010-08-01 16:24 Unison
	root@d-desktop:/media/Iomega HDD# /usr/lib/klibc/bin/fstype /dev/sdb1
	FSTYPE=unknown
	FSSIZE=0
	root@d-desktop:/media/Iomega HDD

Last edited by WantLinuxHelp; 08-02-2010 at 01:04 AM.
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 08-02-2010, 01:22 AM   #2
paulsm4
Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Couldn't have anything to do with "FSTYPE=unknown", could it ?
 
0 members found this post helpful.
Old 08-02-2010, 01:23 AM   #3
foodown
Member
 
Registered: Jun 2009
Location: Texas
Distribution: Slackware
Posts: 609

Rep: Reputation: 218Reputation: 218Reputation: 218
If the filesystem type is NTFS, you may not be able to change the permissions without using a non-native driver for NTFS filesystems. That, or it may be mounted read-only. Can you write to the drive at all? What does the 'mount' command report?

Note that the type is showing as "UNKNOWN"
 
Old 08-02-2010, 01:24 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966
what is the filesystem of the device? It'd need to be a valid posix filesystem in order to hold the rights you want in the filesystem metadata. fstype there doesn't give one, but mount must do.
 
Old 08-02-2010, 10:33 AM   #5
WantLinuxHelp
Member
 
Registered: Jan 2009
Posts: 59
Blog Entries: 2

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by paulsm4 View Post
Couldn't have anything to do with "FSTYPE=unknown", could it ?
I don't know. That's why I checked and included it in the posting.
 
Old 08-02-2010, 10:35 AM   #6
WantLinuxHelp
Member
 
Registered: Jan 2009
Posts: 59
Blog Entries: 2

Original Poster
Rep: Reputation: 15
Thanks for the response.

Quote:
Originally Posted by foodown View Post
If the filesystem type is NTFS, you may not be able to change the permissions without using a non-native driver for NTFS filesystems.
I saw that somewhere, which is why I tried the fstype command. Why does it say "unknown?" Remember, it is a USB device, so it was automounted. I don't know the file type. It was preconfigured. It might very well be NTFS (preconfigured for windows users).

Quote:
Originally Posted by foodown View Post
That, or it may be mounted read-only. Can you write to the drive at all?
I can write to the drive.

Quote:
Originally Posted by foodown View Post
What does the 'mount' command report?
Here's what it says

Code:
d@d-desktop:~$ mount
...
/dev/sdb1 on /media/Iomega HDD type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096,default_permissions)
d@d-desktop:~$
I don't know what that means, though. Does it tell me anything useful?

Quote:
Originally Posted by foodown View Post
Note that the type is showing as "UNKNOWN"
Yes, I know. That's why I included that. How do I find out what the file system type is???
 
Old 08-02-2010, 10:37 AM   #7
WantLinuxHelp
Member
 
Registered: Jan 2009
Posts: 59
Blog Entries: 2

Original Poster
Rep: Reputation: 15
Thanks for the response.

Quote:
Originally Posted by acid_kewpie View Post
what is the filesystem of the device? It'd need to be a valid posix filesystem in order to hold the rights you want in the filesystem metadata. fstype there doesn't give one, but mount must do.
OK. I included the output from the "mount" command in the response I just posted above this one. I don't see where it tells me anything about the file system type.
 
Old 08-02-2010, 10:38 AM   #8
WantLinuxHelp
Member
 
Registered: Jan 2009
Posts: 59
Blog Entries: 2

Original Poster
Rep: Reputation: 15
Maybe I should just reformat the entire drive? If so, what should I use? ext4? It's a 1 Tera byte drive (999 Gb)
 
Old 08-02-2010, 10:50 AM   #9
WantLinuxHelp
Member
 
Registered: Jan 2009
Posts: 59
Blog Entries: 2

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by WantLinuxHelp View Post
Maybe I should just reformat the entire drive? If so, what should I use? ext4? It's a 1 Tera byte drive (999 Gb)
It took me a few years of dual booting Windows/Linux to get to the point of where I'm completely off of Windows. I haven't booted Windows now for 6 months or maybe a year. However, just in case, I want the external drive to be able to be used by windows. If I reformat it, is there a filesystem type I could use that meets all these criteria:
  1. Readable and writeable by both OS's (Linux Ubuntu 10.04 and Windows XP)
  2. Allows chmod from Linux
  3. Supports a 1Tb drive

Last edited by WantLinuxHelp; 08-02-2010 at 11:40 AM.
 
Old 08-02-2010, 12:03 PM   #10
WantLinuxHelp
Member
 
Registered: Jan 2009
Posts: 59
Blog Entries: 2

Original Poster
Rep: Reputation: 15
It appears as though this problem has been around (at least in SUSE) since 2006:

http://www.linuxquestions.org/questi...-fails-410944/
 
Old 08-02-2010, 01:32 PM   #11
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,017

Rep: Reputation: 369Reputation: 369Reputation: 369Reputation: 369
Quote:
1. Readable and writeable by both OS's (Linux Ubuntu 10.04 and Windows XP)
2. Allows chmod from Linux
3. Supports a 1Tb drive
1] = NTFS FAT32 or FAT16
2] = any linux filesystem
3] = ext2 ext3 ext4 reiser .....

Quote:
It appears as though this problem has been around (at least in SUSE) since 2006:
http://www.linuxquestions.org/questi...-fails-410944/
Please do not cross-post / double-post your Q: I am going around in a loop here

The problem is that you want linux's chmod to apply to a non-linux filesystem (NTFS). This isn't going to work: NTFS (AFAIK) has no concept of rwxrwxrwx.

I believe there is a recently released win program that will enable win to read ext3 partitions, but as I haven't used win in years, I don't use it and have have forgotten what it might be called. "You know who" is your friend

So, find the win utility, install it, then format the drive as ext3: chmod will work on it (from linux) but win is not likely to understand what that means, or even obey the restrictions that work correctly with linux.

So I think your requirements (1,2,3) are mutually exclusive. Sorry.

An alternative would be to format the drive as ext3/4 and then allow win to access it over your network by running samba on your linux box. This would be my preferred choice.

HTH.
 
2 members found this post helpful.
Old 08-02-2010, 01:48 PM   #12
WantLinuxHelp
Member
 
Registered: Jan 2009
Posts: 59
Blog Entries: 2

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by WantLinuxHelp View Post
How do I find out what the file system type is???
I found out how to determine this. Gparted says it is NTFS. It's strange, though. Gparted says it cannot read the drive nor can it find the mount point.
 
Old 08-02-2010, 01:56 PM   #13
WantLinuxHelp
Member
 
Registered: Jan 2009
Posts: 59
Blog Entries: 2

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by tredegar View Post
Quote:
Originally Posted by WantLinuxHelp View Post
  1. Readable and writeable by both OS's (Linux Ubuntu 10.04 and Windows XP)
  2. Allows chmod from Linux
  3. Supports a 1Tb drive
  1. = NTFS FAT32 or FAT16
  2. = any linux filesystem
  3. = ext2 ext3 ext4 reiser .....
Thanks, HTH, for this and the other information in this post.


Quote:
Originally Posted by tredegar View Post
Please do not cross-post / double-post your Q: I am going around in a loop here
I didn't. The other question was written by someone else in 2006. I did post a link to this thread in the other thread stating that more information was here, since that one was never solved. Sorry if that was confusing.

Last edited by WantLinuxHelp; 08-02-2010 at 01:57 PM.
 
Old 08-02-2010, 02:21 PM   #14
WantLinuxHelp
Member
 
Registered: Jan 2009
Posts: 59
Blog Entries: 2

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by tredegar View Post

3] = ext2 ext3 ext4 reiser .....
I found that NTFS has a 16Eb partition size limit (that's appx 16,000 Tb). Ubuntu forums had that here:
http://ubuntuforums.org/archive/inde...t-1497666.html
 
Old 08-03-2010, 09:12 AM   #15
business_kid
Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 6,494

Rep: Reputation: 567Reputation: 567Reputation: 567Reputation: 567Reputation: 567Reputation: 567
If you enter the drive in /etc/fstab, and enter your info

/dev/sda /mnt/hd auto noauto,user 1 2
/wandering
The user part allows users play with it. Writing NTFS is a black art, since windows is supposed to spot if you change anything and go crazy - that was the idea behind ntfs back in the days when M$ thought it was OK for an OS to do a BSOD. Now it's a distinct (and repeated) embarrassment that they try to minimize.
/returning to subject
Don't leave it ntfs; it's hassle writing it from linux. Use fat32 - no hassle for any OS
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
External USB Harddisk: chmod fails Maarten_Holland Linux - Hardware 2 08-02-2010 12:05 PM
Apache: difference between chmod 644 and chmod 666 and chmod 600 for output/txt/dat? frenchn00b Programming 6 04-22-2009 01:10 PM
chmod command fails with "Read-only file system" huklBerry Linux - General 8 06-13-2008 03:35 PM
403 error chmod not working Chanoipy Linux - Networking 2 05-27-2005 11:13 PM
chmod fails to do what I expect timsch75 Linux - Newbie 3 03-30-2004 11:10 PM


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

Main Menu
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