LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Change Permissions For Read-Only Filesystem (https://www.linuxquestions.org/questions/slackware-14/change-permissions-for-read-only-filesystem-650772/)

rc nai 06-21-2008 03:42 PM

Change Permissions For Read-Only Filesystem
 
Kinda stuck on this and it's confusing me. I'm trying to transfer a text file into my usb flash-drive with mc(midnight commander) but it said that it's a read-only file system. The usb flash-drive is mounted on /mnt/memory. So now I'm trying to change permissions for /mnt/memory to have rw access. When I do this:
Code:

# chmod u=rw memory/
I get this:
Quote:

chmod: changing permissions of `memory/': Read-only file system
The output of ls -l:
Code:

dr-x------ 1 root root 12288 2008-06-19 22:57 memory
The output of fstab:
Code:

cat /etc/fstab
/dev/hda5        swap            swap        defaults        0  0
/dev/hda2        /                ext3        defaults        1  1
/dev/hda6        /usr            ext3        defaults        1  2
/dev/hda7        /home            ext3        defaults        1  2
/dev/hda1        /fat-c          ntfs-3g    umask=077        1  0
#/dev/cdrom      /mnt/cdrom      auto        noauto,owner,ro  0  0
/dev/fd0        /mnt/floppy      auto        noauto,owner    0  0
devpts          /dev/pts        devpts      gid=5,mode=620  0  0
proc            /proc            proc        defaults        0  0
tmpfs            /dev/shm        tmpfs      defaults        0  0

The filesystem is /dev/sda1 and mounted on /mnt/memory type ntfs (rw)

I'm not sure where to go from here.

T3slider 06-21-2008 04:10 PM

You should mount the drive using the ntfs-3g type if you want to write to it. The following command should mount the device appropriately:
Code:

# mount -t ntfs-3g /dev/sda1 /mnt/memory
This will only be writable by root, however, because of the way ntfs-3g is setup. If you want it to be rw for all users, you would have to set the setuid bit. I don't have any ntfs-formatted devices to test that on, so take my advice with a grain of salt. A search in these forums for ntfs-3g should yield the answer you seek.

rc nai 06-21-2008 05:20 PM

Yea that worked out.

...and for users to have rw, I think it would be like this:
Code:

/dev/sda1 /mnt/memory rw,users,umask=1000


All times are GMT -5. The time now is 05:46 PM.