LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > MEPIS
User Name
Password
MEPIS This forum is for the discussion of MEPIS Linux.

Notices

Reply
 
Search this Thread
Old 05-01-2006, 06:02 AM   #1
limeylew
Member
 
Registered: Aug 2005
Location: Texas
Distribution: Mepis 3.3.2 Ubuntu 5.10
Posts: 60

Rep: Reputation: 15
How to Unlock a file?


I am a Linux dummy and was recently trying unzip and install a file.

Anyway, long story short, I ended up with a 'locked' file in my Documents.

I would appreciate it if someone could tell me how to 'unlock' it, so that I can delete it.

Your help will be appreciated.

Lewis.

****
 
Old 05-01-2006, 09:07 AM   #2
bernied
Member
 
Registered: Mar 2006
Location: Edinburgh, UK
Distribution: debian
Posts: 304

Rep: Reputation: 30
You've probably put the file there as the super (or root) user. So you need to change the ownership of it to 'unlock' it.
Open up a console (I think it's in Accessories, might be called a terminal? If you can't find it, hit Ctrl-Alt-F2 and login there, when finished hit Ctrl-Alt-F7), then find the directory where it is stored. If it's on your desktop, then:
Code:
cd Desktop
ls
Is it there? You can use
Code:
pwd
to find out where you are in the directory structure.

Once you're in the right place (ie, when you type ls, the file is listed):
Code:
chown user file
where user is your login name, and file is the name of the file.

Have a google at 'linux permissions'

And, in a console, try
Code:
man cd
or man followed by any of the other commands you've just used. Look for a basic linux guide - you will learn lots very fast.
 
Old 05-01-2006, 04:00 PM   #3
limeylew
Member
 
Registered: Aug 2005
Location: Texas
Distribution: Mepis 3.3.2 Ubuntu 5.10
Posts: 60

Original Poster
Rep: Reputation: 15
Re: How to unlock a file?

Quote:
Originally Posted by bernied
You've probably put the file there as the super (or root) user. So you need to change the ownership of it to 'unlock' it.
Open up a console (I think it's in Accessories, might be called a terminal? If you can't find it, hit Ctrl-Alt-F2 and login there, when finished hit Ctrl-Alt-F7), then find the directory where it is stored. If it's on your desktop, then:
Code:
cd Desktop
ls
Is it there? You can use
Code:
pwd
to find out where you are in the directory structure.

Once you're in the right place (ie, when you type ls, the file is listed):
Code:
chown user file
where user is your login name, and file is the name of the file.

Have a google at 'linux permissions'

And, in a console, try
Code:
man cd
or man followed by any of the other commands you've just used. Look for a basic linux guide - you will learn lots very fast.
Thanks you very much for a great reply.

Unfortunately I was not successful with it.

werq@1[~]$ cd Documents
werq@1[Documents]$ ls

lshw-B.02.07 (I edited the list down to the offending file)

werq@1[Documents]$ chown werq lshw-B.02.07
werq@1[Documents]$

There was just NO response from the command.

Kind regards.

Lewis.

*****
 
Old 05-01-2006, 04:07 PM   #4
Emerson
Senior Member
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~
Posts: 3,177

Rep: Reputation: Disabled
No response = action successful.
 
Old 05-02-2006, 04:04 AM   #5
bernied
Member
 
Registered: Mar 2006
Location: Edinburgh, UK
Distribution: debian
Posts: 304

Rep: Reputation: 30
Sorry, i left something out.
Try:
Code:
sudo chown user file
sudo is do as super user
or, if you just want the file gone
Code:
sudo rm file
The Ubuntu guides have a lot to say about sudo:
https://wiki.ubuntu.com/RootSudo
 
0 members found this post helpful.
Old 05-02-2006, 05:31 AM   #6
limeylew
Member
 
Registered: Aug 2005
Location: Texas
Distribution: Mepis 3.3.2 Ubuntu 5.10
Posts: 60

Original Poster
Rep: Reputation: 15
Re: How to unlock a file?

Quote:
Originally Posted by Emerson
No response = action successful.
Thanks, you are absolutely right.

When I first looked, the action had not been completed, so I was disappointed and shut the machine down.

After rebooting the 'locked' has gone.

Kind regards.

Lewis.

*****
 
Old 05-02-2006, 05:48 AM   #7
limeylew
Member
 
Registered: Aug 2005
Location: Texas
Distribution: Mepis 3.3.2 Ubuntu 5.10
Posts: 60

Original Poster
Rep: Reputation: 15
Re: How to unlock a file?

Quote:
Originally Posted by bernied
Sorry, i left something out.
Try:
Code:
sudo chown user file
sudo is do as super user
or, if you just want the file gone
Code:
sudo rm file
The Ubuntu guides have a lot to say about sudo:
https://wiki.ubuntu.com/RootSudo
Thanks again, I think I'm on a roll now. :-)

Kind regards.

Lewis.

*****
 
Old 06-16-2010, 09:14 PM   #8
Evailya
LQ Newbie
 
Registered: Jun 2010
Posts: 6

Rep: Reputation: 0
Failed for me need help

Quote:
Originally Posted by bernied View Post
You've probably put the file there as the super (or root) user. So you need to change the ownership of it to 'unlock' it.
Open up a console (I think it's in Accessories, might be called a terminal? If you can't find it, hit Ctrl-Alt-F2 and login there, when finished hit Ctrl-Alt-F7), then find the directory where it is stored. If it's on your desktop, then:
Code:
cd Desktop
ls
Is it there? You can use
Code:
pwd
to find out where you are in the directory structure.

Once you're in the right place (ie, when you type ls, the file is listed):
Code:
chown user file
where user is your login name, and file is the name of the file.

Have a google at 'linux permissions'

And, in a console, try
Code:
man cd
or man followed by any of the other commands you've just used. Look for a basic linux guide - you will learn lots very fast.
I followed all of the step when i type ls the file is listed but when i try to do the rest of it this is what i get
evailya@evailya-laptop:~$ cd Desktop
evailya@evailya-laptop:~/Desktop$ ls
World of Warcraft wow wowmatrix
evailya@evailya-laptop:~/Desktop$ chown evailya World of Warcraft
chown: cannot access `World': No such file or directory
chown: cannot access `of': No such file or directory
chown: cannot access `Warcraft': No such file or directory
evailya@evailya-laptop:~/Desktop$


the World of Warcraft file is the one that is locked
 
Old 06-16-2010, 11:07 PM   #9
yancek
Senior Member
 
Registered: Apr 2008
Distribution: PCLinux, Ubuntu, Slackware
Posts: 4,528

Rep: Reputation: 705Reputation: 705Reputation: 705Reputation: 705Reputation: 705Reputation: 705Reputation: 705
You have spaces in the filename so use double quotes:

evailya@evailya-laptop:~/Desktop$ chown evailya "World of Warcraft"
 
Old 06-17-2010, 12:40 AM   #10
Evailya
LQ Newbie
 
Registered: Jun 2010
Posts: 6

Rep: Reputation: 0
Still not working

I have done all of the steps even added the quotation marks and it is still locked this is what i get
evailya@evailya-laptop:~$ cd Desktop
evailya@evailya-laptop:~/Desktop$ ls
World of Warcraft wow wowmatrix
evailya@evailya-laptop:~/Desktop$ chown evailya "world of Warcraft"
chown: cannot access `world of Warcraft': No such file or directory
evailya@evailya-laptop:~/Desktop$ chown evailya "World of Warcraft"
evailya@evailya-laptop:~/Desktop$

So i restarted my compter after each time i got that response because the other person said when he got no response it worked after restarting but not mine what else could it be
 
Old 06-17-2010, 10:10 AM   #11
djsmiley2k
Member
 
Registered: Feb 2005
Location: Coventry, UK
Distribution: Home: Gentoo x86/amd64, Debian ppc. Work: Ubuntu, SuSe, CentOS
Posts: 343
Blog Entries: 1

Rep: Reputation: 72
Evailya:

Can you paste the output of
Code:
ls -la
and we can see what permissions etc the file has created with. Also as someone else said, you made need to run the "chown" as root.

Code:
sudo chown ....
Have fun
 
0 members found this post helpful.
Old 06-17-2010, 10:14 AM   #12
yancek
Senior Member
 
Registered: Apr 2008
Distribution: PCLinux, Ubuntu, Slackware
Posts: 4,528

Rep: Reputation: 705Reputation: 705Reputation: 705Reputation: 705Reputation: 705Reputation: 705Reputation: 705
The file is in the evailya /home directory and you are running the command as user evailya and it is locked. You need to log in as root user, enter root password and then run the command.

Also, as suggested above, do chown. This needs to be done as root user also. You may need to use sudo command, you didn't indicate which version of Linux you are using.

Case sensitivity at command line, World of Warcraft is not the same as world of warcraft. If there are caps, you need to use caps in the command. If everything is lower case letters, you need to use lower case letters.

Last edited by yancek; 06-17-2010 at 10:24 AM.
 
1 members found this post helpful.
Old 06-18-2010, 12:48 PM   #13
Evailya
LQ Newbie
 
Registered: Jun 2010
Posts: 6

Rep: Reputation: 0
Quote:
Originally Posted by djsmiley2k View Post
Evailya:

Can you paste the output of
Code:
ls -la
and we can see what permissions etc the file has created with. Also as someone else said, you made need to run the "chown" as root.

Code:
sudo chown ....
Have fun
Here is what you asked for

evailya@evailya-laptop:~/Desktop$ ls -la
total 3224
drwxr-xr-x 4 evailya evailya 4096 2010-06-16 21:22 .
drwxr-xr-x 50 evailya evailya 4096 2010-06-18 13:39 ..
dr-xr-sr-x 11 evailya evailya 4096 2010-06-15 21:32 World of Warcraft
drwxr-xr-x 4 evailya evailya 4096 2010-06-16 21:23 wow
-rwxr-xr-x 1 evailya evailya 3284161 2009-10-27 06:35 wowmatrix
evailya@evailya-laptop:~/Desktop$




as yancek asked I am running Zorin to my knowledge i was able to figure out how to log in as root user but I do not know the root commands I need to unlock it

Last edited by Evailya; 06-18-2010 at 01:08 PM.
 
Old 06-18-2010, 12:50 PM   #14
wcc1776
LQ Newbie
 
Registered: Jul 2007
Location: SE IN,USA
Distribution: MEPIS
Posts: 20

Rep: Reputation: 2
Try using su instead of sudo, MEPIS doesn't have sudo enabled by default.

Wayne
 
1 members found this post helpful.
Old 06-18-2010, 12:53 PM   #15
yancek
Senior Member
 
Registered: Apr 2008
Distribution: PCLinux, Ubuntu, Slackware
Posts: 4,528

Rep: Reputation: 705Reputation: 705Reputation: 705Reputation: 705Reputation: 705Reputation: 705Reputation: 705
You should type "su" without quotes, hit the enter key and be prompted for your root password. Enter it and enter the command.
 
  


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 do I unlock a file? Brooksias Linux - Newbie 8 12-14-2010 06:49 AM
Cannot Unlock Session sunmicroman Slackware 9 09-09-2005 04:04 PM
Xauth will not unlock a file at /home/username javpra Linux - Newbie 3 09-08-2004 07:36 PM
How to unlock urpmi? akihandyman Mandriva 2 05-31-2004 12:45 AM
unlock my cdrecorder!! Steave Linux - General 2 12-13-2001 11:46 AM


All times are GMT -5. The time now is 10:39 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