Find the answer to your Linux question:
Results 1 to 8 of 8
HI, I have an external 800GB USB drive I used for storage for both files from Win XP and Suse 9.0. I can read and write my data from Win ...
  1. #1
    pom
    pom is offline
    Just Joined!
    Join Date
    Nov 2004
    Posts
    17

    directory file name with space

    HI,

    I have an external 800GB USB drive I used for storage for both files from Win XP and Suse 9.0.
    I can read and write my data from Win XP o.k but when I try to write any files from Suse side it gave me 'read only file system' . This drive from Unix is mounted in /media directory with root owner with executable and read only. When I changed to become root and issue
    chmod 777 'FreeAgent Drive'
    I got error
    chmod: changing permissions of 'FreeAgent Drive': Read only file system.

    From unix, reading any file on this drive, using gui application, I can not access the drive at all but I can see all files on the drive using a command with quote (cd /media/'FreeAgent Drive')

    Can someone please help me with this.

    thank you

  2. #2
    Linux Guru
    Join Date
    Oct 2007
    Location
    Tucson AZ
    Posts
    1,939
    The data you have on the USB drive, do you have separate partitions for the xp and Suse Linux files?

    What filesystem are you using? ntfs? ext3?

    How long have you had this dual-boot setup? Suse Linux 9.0 is at least five years old, I used 9.2 for at least that long. I doubt that ntfs-3g was available with a default installation of 9.0 and you need that to write to ntfs partitions.

    Without knowing the answers to the questions above, it would be difficult to guess the problem. The Suse Linux you're using is pretty outdate.

  3. #3
    Linux Newbie
    Join Date
    Oct 2008
    Posts
    140
    Sounds as if it was mounted as read only. Why don't you try re-mounting it?

    Quote Originally Posted by pom View Post
    HI,
    I can see all files on the drive using a command with quote (cd /media/'FreeAgent Drive')
    The space needs to be escaped. Try a backslash in front of spaces in filenames.
    cd /media/FreeAgent\ Drive

    Since you can CD to it, we know that it's mounted and also that you can read the filesystem. This is correct, yes? You can see your files, read your .docs in OpenOffice, etc?

  4. #4
    Just Joined!
    Join Date
    Jul 2007
    Posts
    14
    I'm not sure that the space in the filename is relevant -- since you can see the files, even if not write to the drive, the OS must be recognizing the drive as invoked.

    As yancek notes, it would help to know if you're trying to write to a single partition from both OSes, or if you're writing to separate partitions from Windows and Linux. From the context of your posting, I'm assuming the former.

    In order to be read by Windows, your external HDD is probably formatted as either a FAT16, FAT32, or NTFS filesystem, and I'm guessing you probably have a line in your /etc/fstab that defines how it's mounted. If so, look at the UID, GID, and Umask setting on that line. Are the UID and GID set for ownership by the root user? And does the Umask block other users from writing (e.g., something like 002 or 022, for example)? If so, I think you'll need to change these settings in the fstab file.

  5. #5
    Just Joined!
    Join Date
    Nov 2004
    Location
    Waterloo, Ontario, Canada
    Posts
    10
    I'm more an Ubuntu user, but it sounds like you don't have the most up-to-date NTFS driver. For a while, Ubuntu came packaged with a read-only driver for NTFS file systems (which is what XP and beyond uses by default). It's only in the last year or two that Ubuntu comes out-of-the-box with a write-enabled driver.

    In Ubuntu the driver is called NTFS-3G. You might want to verify if it is installed on your system.

  6. #6
    Just Joined!
    Join Date
    Apr 2010
    Location
    Perth Western Australia
    Posts
    2
    Quote Originally Posted by pom View Post
    HI,

    I have an external 800GB USB drive I used for storage for both files from Win XP and Suse 9.0.
    I can read and write my data from Win XP o.k but when I try to write any files from Suse side it gave me 'read only file system' . This drive from Unix is mounted in /media directory with root owner with executable and read only. When I changed to become root and issue
    chmod 777 'FreeAgent Drive'
    I got error
    chmod: changing permissions of 'FreeAgent Drive': Read only file system.

    From unix, reading any file on this drive, using gui application, I can not access the drive at all but I can see all files on the drive using a command with quote (cd /media/'FreeAgent Drive')

    Can someone please help me with this.

    thank you
    Hi Pom, my best suggestion is to go to this link which very clearly gives you simple instructions on how to get around problems with filenames with spaces in them (plus a few other problem characters)

    tuxfiles.org/linuxhelp/weirdchars.html

    As I haven't posted enough replies yet in the forums I am unable to put the link in as normal so you will need to add the preceding http www etc.

    Hope it helps - hilly53 - Perth - Western Australia

  7. #7
    pom
    pom is offline
    Just Joined!
    Join Date
    Nov 2004
    Posts
    17
    Thank you all for the suggestion.
    I would like to answer all of you here.

    I have this dual boot system for quite sometime more than 4 years. I know that Suse 9.0 is quite old but what I need the unix side for is very simple and do not want to compromise some of the software I have set up for my work. I do not really want anything new, I am not a unix programmer.
    However, just in case I really have to, Can I update to the latest Suse without loosing any capability that I have right now, ie. custom software.

    My USB external drive is NTFS system. I did not mount this drive since the system recognize the drive after login and can access with no problem. Do you think I need to explicitly mount it in order to write onto this drive. I can access any files on this drive as well except writing.

    As for cd to the drive, using backslash per kertdriver's does not work

    /home/pom> cd /media/FreeAgent\Drive
    /media/FreeAgentDrive: No such file or directory.

    but using quotes seems to work for me.

    /home/pom> cd /media/'FreeAgent Drive'
    /media/FreeAgent Drive>

    Per qajaq suggestion, this is what I have in my fstab

    /media/FreeAgent Drive> more /etc/fstab
    /dev/sda3 / ext3 acl,user_xattr 1 1
    /dev/sda1 /windows/C ntfs ro,users,gid=users,umask=0002,nls=utf8 0 0
    /dev/sda2 swap swap defaults 0 0
    proc /proc proc defaults 0 0
    sysfs /sys sysfs noauto 0 0
    debugfs /sys/kernel/debug debugfs noauto 0 0
    usbfs /proc/bus/usb usbfs noauto 0 0
    devpts /dev/pts devpts mode=0620,gid=5 0 0
    /dev/fd0 /media/floppy auto noauto,user,sync 0 0


    I would really appreciate any suggestion how to edit fstab for this.

    thank you for your time
    Pom

  8. #8
    Linux Newbie
    Join Date
    Oct 2008
    Posts
    140
    Hi Pom the backslash would have worked if you had kept the space. It's purpose is to escape the space, ie to tell the shell that the space has no special meaning.
    Remounting will solve your problem. See in your fstab the line that says

    /dev/sda1 /windows/C ntfs ro,users,gid=users,umask=0002,nls=utf8 0 0

    The ro means read only.
    [you@yourbox you]$ mount /dev/sda1 -o remount, rw /media/FreeAgent\ Drive

    Edit: Edit fstab in any text editor to change that line. A second thought, comment the line out with a # highlight and past the line just below it. That way if something goes wrong you'll have a semi-working fstab file. Always backup!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...