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 05-30-2009, 01:12 PM   #1
johnnyxxxcakes
Member
 
Registered: Nov 2008
Location: /home/john
Distribution: Fedora 11 Xfce
Posts: 40

Rep: Reputation: 15
All files are locked on my flash drive


I recently plugged in my 8GB flash drive after a fresh install of Mandriva Linux 2009.0 Xfce on my Eee PC, and when I try to delete something, it says something along the lines of:

Quote:
Failed to copy "/media/disk-1/madwifi-hal-0.10.5.6-r4031-20090529/hal/public/wisoc.hal.o.uu" to "trash:///0-madwifi-hal-0.10.5.6-r4031-20090529$1/hal/public/wisoc.hal.o.uu".
I figured I should open the terminal and try to delete the folder with a sudo command. Well, I tried that and noticed that the files all have locks next to their folder icons.

What should I do to remove these restrictions?

Last edited by johnnyxxxcakes; 05-30-2009 at 02:09 PM.
 
Old 05-30-2009, 05:25 PM   #2
hasienda
Member
 
Registered: May 2009
Location: Saxony, Germany
Distribution: Debian/GNU Linux
Posts: 37

Rep: Reputation: 18
Exclamation Linux permission management

Quote:
Originally Posted by johnnyxxxcakes View Post
I recently plugged in my 8GB flash drive after a fresh install of Mandriva Linux 2009.0 Xfce on my Eee PC, and when I try to delete something, it says something along the lines of: [snip]
I figured I should open the terminal and try to delete the folder with a sudo command. Well, I tried that and noticed that the files all have locks next to their folder icons.

What should I do to remove these restrictions?
You may try this:
Open a terminal, not a file manager window. You'll see no folder icons, if you do that right. Change to the mount point. Look at the data.
Code:
$> cd /media/disk-1
$> ls -al ./
total 1009916
drwxr-x--- 55 someone someone       4096 30. Mai 12:44 .
drwxr-xr-x  6 root    root          4096  4. Jan 04:07 ..
drwx------  2 someone someone       4096 15. Apr 23:13 madwifi-hal-0.10.5.6-r4031-20090529
-rw-r--r--  1 someone someone        266  9. Dez 2008  anything_else
[snip]
You might happen to be not the user "someone". Change that, if you are allowed to do so on that system.
Code:
$> chown johnny:johnny ./madwifi-hal-0.10.5.6-r4031-20090529
$> ls -al ./
total 1009916
drwxr-x--- 55 someone someone       4096 30. Mai 12:44 .
drwxr-xr-x  6 root    root          4096  4. Jan 04:07 ..
drwx------  2 johnny  johnny        4096 15. Apr 23:13 madwifi-hal-0.10.5.6-r4031-20090529
-rw-r--r--  1 someone someone        266  9. Dez 2008  anything_else
[snip]
Now you own it and can do to it whatever you want. ("Lock" symbols will disappear in graphical file managers.)

You may choose to do it another way, if sudo doesn't work/is configured to give enough rights to you: Become the superuser by "su", do what you want, "exit". You might want to take over everything inside, sub-dirs, files, not just a single directory/file.
Code:
$> chown -R johnny:johnny ./
$> ls -al ./
total 1009916
drwxr-x--- 55 johnny  johnny        4096 30. Mai 12:44 .
drwxr-xr-x  6 root    root          4096  4. Jan 04:07 ..
drwx------  2 johnny  johnny        4096 15. Apr 23:13 madwifi-hal-0.10.5.6-r4031-20090529
-rw-r--r--  1 johnny  johnny         266  9. Dez 2008  anything_else
[snip]
Another way would be to extend permissions to group and add yourself as a member to that group "someone".
Code:
$> chmod g+rwx ./madwifi-hal-0.10.5.6-r4031-20090529
$> useradd -G someone johnny
$> ls -al ./
total 1009916
drwxr-x--- 55 someone someone       4096 30. Mai 12:44 .
drwxr-xr-x  6 root    root          4096  4. Jan 04:07 ..
drwxrwx---  2 someone someone       4096 15. Apr 23:13 madwifi-hal-0.10.5.6-r4031-20090529
-rw-r--r--  1 someone someone        266  9. Dez 2008  anything_else
[snip]
Attention: You need to log out an log-in again to make the group change effective.

The above are all fictive examples. Think before you type blindly, please. Man pages are your friends to get familiar to the *nix standard tools. - Have fun.
 
Old 05-30-2009, 11:34 PM   #3
johnnyxxxcakes
Member
 
Registered: Nov 2008
Location: /home/john
Distribution: Fedora 11 Xfce
Posts: 40

Original Poster
Rep: Reputation: 15
Okay I tried:
Quote:
chown johnny:johnny ./madwifi-hal-0.10.5.6-r4031-20090529
and now I can't even delete or rename files when I right-click on the folder. What should I do to revert back?

I just want to be able to have all access to those files. Isn't there a simple command to do this?
 
  


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
how to access files in USb flash drive riba43 SUSE / openSUSE 4 07-09-2007 04:34 AM
Writing files to flash drive in the right order andy_g_gray Linux - Hardware 3 11-26-2006 11:50 AM
How to write files immediately to flash drive. adds2one Linux - Hardware 7 10-06-2006 01:13 AM
Cannot mount USB Flash Drive, 4 device files Hakala Linux - Software 1 04-01-2006 01:20 PM
LXer: EDGE Tech Corp Announces Portable Flash Drive With Muscle - the New 8GB DiskGO!(TM) Now Available; Swap and Go With This Secure Thumb-Sized Flash Drive LXer Syndicated Linux News 0 12-14-2005 03:16 AM


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