LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 01-14-2007, 05:17 PM   #1
SVwander
Member
 
Registered: Mar 2006
Distribution: Kubuntu 7.04
Posts: 87

Rep: Reputation: 15
setting permission


Okay, I give up! When I reinstalled Ubuntu somehow I lost permission to delete files on my usbdisk. I have researched and found I can use chmod to change the permissions for the ubsdisk but nothing I have tried works. Can someone walk me through it?
I have used this command:
sudo chmod rwx /media/usbdisk/PHOTOS_1

it didn't work so I tried it with a - before the rwx but I read that counters the permission. Anyway, can someone show me how to correctly form the command. Later I will look at how to apply permission to read write and execute using gedit.

Tim
 
Old 01-14-2007, 05:24 PM   #2
PatrickNew
Senior Member
 
Registered: Jan 2006
Location: Charleston, SC, USA
Distribution: Debian, Gentoo, Ubuntu, RHEL
Posts: 1,148
Blog Entries: 1

Rep: Reputation: 48
Well, I'm not sure, but I think you need a + before the rwx, but the best solution is to use 777, the octal combination for the same thing.
 
Old 01-14-2007, 05:25 PM   #3
uselpa
Senior Member
 
Registered: Oct 2004
Location: Luxemburg
Distribution: Slackware, OS X
Posts: 1,507

Rep: Reputation: 46
Try
Code:
sudo chmod ug=rwx /media/usbdisk/PHOTOS_1
 
Old 01-14-2007, 05:39 PM   #4
SVwander
Member
 
Registered: Mar 2006
Distribution: Kubuntu 7.04
Posts: 87

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by uselpa
Try
Code:
sudo chmod ug=rwx /media/usbdisk/PHOTOS_1
tim@tim-desktop:~$ sudo chmod ug=rwx /media/usbdisk/PHOTOS_1
Password:
chmod: changing permissions of `/media/usbdisk/PHOTOS_1': Read-only file system
tim@tim-desktop:~$

I think it is still read only. All I need to do is delete the files off that usbdisk. I am using Nautilus 2.16.1 and refreshing after the command in the terminal. I am RESISTING the urge to go to XP to delete those files!

Tim
 
Old 01-14-2007, 06:29 PM   #5
PatrickNew
Senior Member
 
Registered: Jan 2006
Location: Charleston, SC, USA
Distribution: Debian, Gentoo, Ubuntu, RHEL
Posts: 1,148
Blog Entries: 1

Rep: Reputation: 48
try one last thing, change it to
Code:
chmod 777 /media/usbdisk/PHOTOS_1/*
That will act on each item separately, instead of changing the general permissions of the folder.
 
Old 01-14-2007, 06:42 PM   #6
SVwander
Member
 
Registered: Mar 2006
Distribution: Kubuntu 7.04
Posts: 87

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by PatrickNew
try one last thing, change it to
Code:
chmod 777 /media/usbdisk/PHOTOS_1/*
That will act on each item separately, instead of changing the general permissions of the folder.
Well, I am still not there. It is still claiming it is a read only disk. I have pasted my the output below and the error message when trying to delete the files.


tim@tim-desktop:~$ chmod 777 /media/usbdisk/PHOTOS_1/*
chmod: changing permissions of `/media/usbdisk/PHOTOS_1/01120001.JPG': Read-only file system
chmod: changing permissions of `/media/usbdisk/PHOTOS_1/01120002.JPG': Read-only file system
chmod: changing permissions of `/media/usbdisk/PHOTOS_1/01120003.JPG': Read-only file system
chmod: changing permissions of `/media/usbdisk/PHOTOS_1/01120004.JPG': Read-only file system
chmod: changing permissions of `/media/usbdisk/PHOTOS_1/01120005.JPG': Read-only file system




tim@tim-desktop:~$ ls -l /media/usbdisk
total 168
-rwx------ 1 tim tim 18183 2006-12-18 19:18 checking2.QIF
-rwx------ 1 tim tim 98304 2006-12-27 12:25 Jackie76a.doc
-rwx------ 1 tim tim 33783 2006-12-27 11:34 jackie76.wp
drwx------ 2 tim tim 4096 2006-12-22 10:56 PHOTOS_1
-rwx------ 1 tim tim 11237 2006-12-26 11:20 timesaddress.ldif

Error while deleting.
"/media/usbd...cking2.QIF" cannot be deleted because it is on a read-only disk.
 
Old 01-14-2007, 06:50 PM   #7
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 332Reputation: 332Reputation: 332Reputation: 332
Quote:
im@tim-desktop:~$ sudo chmod ug=rwx /media/usbdisk/PHOTOS_1
Password:
chmod: changing permissions of `/media/usbdisk/PHOTOS_1': Read-only file system
tim@tim-desktop:~$

I think it is still read only. All I need to do is delete the files off that usbdisk. I am using Nautilus 2.16.1 and refreshing after the command in the terminal. I am RESISTING the urge to go to XP to delete those files!
According to your error message from the chmod command you are correct in believing that the file system on the USB disk is mounted read only. That could be due to it being formatted with the NTFS file system. Generally Linux will mount NTFS file systems as read only. It's a pity that you didn't include that error message in your original post. That information would have helped the people who read your post to better understand the problem.

I don't know if Ubuntu has the latest NTFS driver that allegedly can reliably write to NTFS file systems without corrupting them. Generally you want to use Win FAT32 file systems to store files that will be accessed by both Linux and Windows. If Windows would not be used then a Linux file system is the best choice.

How did the files get on this disk? Did you use Windows to put the files there?

You can try to use the disk as is, presumably with an NTFS file system. In that case you would do something like this. This example has the USB file system mounted at /mnt/usb1.
Code:
mount -o rw,gid=100,mode=777 /dev/sda1 /mnt/usb1
That should do the trick. However if you have an NTFS file system on the USB drive you are playing with fire. You would be better off reformatting the USB file system either with Win FAT32 or with a Linux file system like ext3.
 
Old 01-27-2007, 08:51 AM   #8
alinuxfan
LQ Newbie
 
Registered: Jan 2007
Location: Germany
Distribution: ubuntu, slackware, vector, slitaz
Posts: 1

Rep: Reputation: 0
I am getting the same error after I did a fresh install. I cut a whole folder of pictures and pasted them onto my computer while updates were being installed with synaptic and now after the updates, something messed up my ability to mount as a writable drive

I put the files on my stick so that I could re-install my system...
and now with a fresh install I can't read the disk.
 
Old 01-28-2007, 09:27 AM   #9
SVwander
Member
 
Registered: Mar 2006
Distribution: Kubuntu 7.04
Posts: 87

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by alinuxfan
I am getting the same error after I did a fresh install. I cut a whole folder of pictures and pasted them onto my computer while updates were being installed with synaptic and now after the updates, something messed up my ability to mount as a writable drive

I put the files on my stick so that I could re-install my system...
and now with a fresh install I can't read the disk.
Keep at it. It took me several tries before I was able to move those files but the instructions above will get you there.
 
Old 01-28-2007, 12:04 PM   #10
gonzojd7
Member
 
Registered: Oct 2005
Location: Florida, USA
Distribution: Ubuntu 8.04, 9.04
Posts: 37

Rep: Reputation: 15
Read only problem?

Try posting a printout of your mounted systems with the usb stick in.

Use this command in a shell/terminal:

$mount

The output should tell you how your usb is mounted,

/dev/sda1 n /mnt/usb type vfat (rw)

If it states (ro) at the end then you need to edit the fstab to make it (rw)

Then post the results here. It may be possible that the usb stick is mounted ro (read only). If it is then you just need to edit the line in fstab and have it read rw.

sample line in fstab

/dev/sda1 /mnt/thumb vfat defaults,user,rw 0 0

Let me know how you make out ?
 
  


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
permission setting of a scanner? behmjoe Linux - Hardware 1 01-01-2006 04:53 AM
SUID and setting 'other' permission to _ _ x hpladd Linux - Newbie 3 06-17-2005 02:37 PM
Permission setting tkt Linux - Newbie 4 06-08-2005 10:06 PM
setting up permission dramous Linux - Software 1 10-19-2004 12:44 PM
Permission setting in RH9 lordgrey.org.uk Linux - Newbie 2 01-21-2004 02:12 PM


All times are GMT -5. The time now is 10:36 AM.

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