LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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-17-2010, 09:48 AM   #1
msbstar
Member
 
Registered: Jan 2010
Distribution: Ubuntu 10.4
Posts: 122

Rep: Reputation: 16
Question How to get rid of the "Lock" sign on files and folders forever??


Hello,

I have Ubuntu 9.10 installed on my laptop.
every time I save some files in my desktop a sign of "lock"
is appeared attached to the file's icon.
Then by using this command I can remove it:

"chown pc *"

What can I do if I want not to see that sign (the sign of a lock)
anymore?

With best regards,
Hassan
 
Old 01-17-2010, 09:51 AM   #2
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
Make sure you own the files you are saving.

This depends on where you got the files and how you are saving them.
 
0 members found this post helpful.
Old 01-17-2010, 10:04 AM   #3
msbstar
Member
 
Registered: Jan 2010
Distribution: Ubuntu 10.4
Posts: 122

Original Poster
Rep: Reputation: 16
Would You Please Explain More?

Last edited by msbstar; 01-17-2010 at 03:06 PM.
 
Old 01-17-2010, 10:09 AM   #4
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
The LOCK icon means that a file or folder is owned by a privileged user, such as "root", but the user account you are currently logged in as, does not have enough permissions to read the file or enter the folder.
This happens (the LOCK icon) if you for example, edit a file as root, and then save it to a location like a regular users /home folder. The root user will not see the LOCK icon, because he has enough permissions to access the file, but a regular user will see the LOCK icon, because he doesn't have the permission to view the file.

By using the `chown` command (presumably as root, or with sudo) you are changing ownership of something. Changing a "root" owned file or folder, so that it is owned by your regular user, will allow the regular user to now view or access the file/folder.

Does this help?

Sasha
 
Old 01-17-2010, 03:04 PM   #5
msbstar
Member
 
Registered: Jan 2010
Distribution: Ubuntu 10.4
Posts: 122

Original Poster
Rep: Reputation: 16
Hi Sasha,

Thanks a lot for your comprehensive explanation.

Is there any way to let all the users to have access
to any files and folders SO there will be no LOCK
icon any more and forever?
Or we are destined to see the LOCK icon?

Best,
Hassan

Last edited by msbstar; 01-17-2010 at 03:09 PM.
 
Old 01-17-2010, 03:13 PM   #6
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
Well, the question you ask above, is not one that has a simple yes or no answer.

One of the core ideas underneath EVERY Linux distribution, is the hierarchy of users with varying levels of privilege. Root is the most powerful user, who can do anything, including destroy the installed system. For this reason, it is not generally accepted practice to give ALL users the same amount of access privilege, otherwise, ANY user could theoretically bork a system really badly.

Most of the stuff on a Linux system is READABLE by regular users, but not WRITEABLE. And, some folders are not even ENTERABLE by a regular user, only root.

Now, you're using Ubuntu, which has even MORE restrictive measures in place: the root account is not even fully enabled, and/or there is no password associated with it, making it very hard for a regular user to damage the system. In the Ubuntu world, you guys use `sudo` to get some limited, temporary root powers.

So, in short, the smart answer is NO, there is no way to allow ALL users to access ALL stuff on the machine freely at will. Letting all users have this sort of access is a bad idea.

Now that we've made that clear, I'll give you another thread to look at, just for another perspective on what you're asking: http://www.linuxquestions.org/questi...om-gui-782655/

And after having read that, if you have further inquirires, feel free to ask! As mentioned in that other thread, I don't use *buntu myself, but loads of users here do, so someone will be able to answer your questions if I cannot.

Cheers!
Sasha
 
1 members found this post helpful.
Old 01-17-2010, 10:52 PM   #7
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
Another way you can get the lock icon is if you copy a file from one computer to another in a manner which preserves permissions.

I can be user simon on two different computers, but these will often end up as two different simons as far as linux is concerned. Thus the simon@indigo-prime cannot alter files owned by simon@joker even though they are both ordinary users and both me.

I've seen this happen with CDROM backups - the restored files were all locked because the newly created me had a different uid from the original me.

The solution is to choose a method of copying or transferring files which does not preserve permissions. The exact method to use will depend on what Hassan is trying to do - exactly. Because we do not know how Hassan is transferring the files, we cannot really know what to advise.
 
1 members found this post helpful.
Old 01-18-2010, 12:30 AM   #8
msbstar
Member
 
Registered: Jan 2010
Distribution: Ubuntu 10.4
Posts: 122

Original Poster
Rep: Reputation: 16
HI,

"Sasha" and "Simon Bridge", I thank you so much for your
replies.
I think I understood the situation.

Best regards,
Hassan

Last edited by msbstar; 01-18-2010 at 12:33 AM.
 
Old 08-05-2013, 02:43 AM   #9
bhargavigoswami
LQ Newbie
 
Registered: Jul 2012
Posts: 9

Rep: Reputation: Disabled
Thumbs up Just one command would remove lock sign from your file/folder.

Follow following steps for removing lock sign from your file/folder.

step 1: open terminal
step 2: sudo su
step 3: give password
step 4: go to location where file/folder is located.
step 5: give following command: chmod a+rwx <file/folder_name>
step 6: Now check whether the lock sign is gone or not.

That's it. Problem solved.
 
  


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
"cannot access files or folders of an NTFS Win XP share if their names contain space" ramanujank Linux - Newbie 2 09-03-2009 02:09 PM
Text editior that can "see"/open hiddien files/folders?? like .fluxbox linus72 Linux - Software 4 08-11-2009 07:34 AM
How might I restore kmail folders/mail/settings from a "badly" saved "home"? deh6 Linux - Software 5 03-08-2008 09:25 PM
I need to get rid of my old kbfx files to install new version - "access denied" Onewheelinweirdo Linux - Software 5 03-28-2007 08:04 AM
When "function pointer" meets "template"... I can't get rid of this compiling er cyu021 Linux - Software 3 12-17-2004 07:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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