LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Unlocking folder in Dapper Ubuntu (https://www.linuxquestions.org/questions/linux-newbie-8/unlocking-folder-in-dapper-ubuntu-492147/)

limeylew 10-13-2006 01:04 PM

Unlocking folder in Dapper Ubuntu
 
I have Dapper 6.06.1 and have a 'locked' folder on my desktop.

Its just a bunch of photos that I transferred from XP to Mepis and then to Ubuntu on a memory stick but I would appreciate it if someone would tell me (or point me to a link) how to get rid of the 'padlock'.

Thanks.

Lewis.

*****

pljvaldez 10-13-2006 01:24 PM

I think that means you don't have proper access (I don't use Gnome desktop). You can probably chmod it from the command line or right click on it and see if you can change the permissions to something you can read (like 644 rw-r--r--).

pixellany 10-13-2006 01:25 PM

Quote:

Originally Posted by limeylew
I have Dapper 6.06.1 and have a 'locked' folder on my desktop.

Its just a bunch of photos that I transferred from XP to Mepis and then to Ubuntu on a memory stick but I would appreciate it if someone would tell me (or point me to a link) how to get rid of the 'padlock'.

Thanks.

Lewis.

*****

Open a terminal and cd to the Desktop directory. Then "ls -l" to see the ownership and permissions of the folder in question. You probably can fix the issue by simply making yourself the owner:
Assuming you have not activated the root account in Ubuntu, you would do something like this:

sudo chown -R <yourname> <foldername>

The translation of this gibberish is roughly as follows: Operating with super-user privileges (sudo), please change the owner (chown) for the folder named <foldername>, and all of its contents (-R), to <username>.

You may also need to change permissions...

For more detail--do these (in the terminal)

man chown
man chmod

limeylew 10-13-2006 03:51 PM

Quote:

Originally Posted by pixellany
Open a terminal and cd to the Desktop directory. Then "ls -l" to see the ownership and permissions of the folder in question. You probably can fix the issue by simply making yourself the owner:
Assuming you have not activated the root account in Ubuntu, you would do something like this:

sudo chown -R <yourname> <foldername>

The translation of this gibberish is roughly as follows: Operating with super-user privileges (sudo), please change the owner (chown) for the folder named <foldername>, and all of its contents (-R), to <username>.

You may also need to change permissions...

For more detail--do these (in the terminal)

man chown
man chmod


Thanks for your help here, I appreciate it.

I am having trouble executing these commands and it seems to be because the folder is named My Pictures. Although I have tried with using quotation marks, apostrophes and also with a hyphen in between, I still get a message 'no such file'.

>>>
yuio@yuio-desktop:~$ cd desktop
yuio@yuio-desktop:~$ cd Desktop
yuio@yuio-desktop:~/Desktop$ sudo chown -R yuio My Pictures
chown: cannot access `My': No such file or directory
chown: cannot access `Pictures': No such file or directory
yuio@yuio-desktop:~/Desktop$
<<<

I MUST be doing something wrong, right?

Kind regards.

Lewis.

*****

pixellany 10-13-2006 05:28 PM

Here's a little demo:

Code:

[root@mherring-w2k mherring]# mkdir play
[root@mherring-w2k mherring]# cd play
[root@mherring-w2k play]# ls
[root@mherring-w2k play]# mkdir "abc def"
[root@mherring-w2k play]# ls
abc def
[root@mherring-w2k play]# ls -l
total 4
drwxr-xr-x  2 root root 4096 Oct 13 15:14 abc def
[root@mherring-w2k play]# chown -R mherring "abc def"
[root@mherring-w2k play]# ls -l
total 4
drwxr-xr-x  2 mherring root 4096 Oct 13 15:14 abc def
[root@mherring-w2k play]#

I was able to make a directory named "abc def" and then change its owner using quotes.

This also works:

Code:

[root@mherring-w2k play]# chown -R root abc\ def
[root@mherring-w2k play]# ls -l
total 4
drwxr-xr-x  2 root root 4096 Oct 13 15:14 abc def
[root@mherring-w2k play]#

Here, I changed it again using "\" to escape the space in the file name.

Another trick is simply to use the wild card--as long as it is unique, you can access the directory of file name with the 1st few letters + "*". Thus, In my example,
Code:

chown -R name abc*
would also work

limeylew 10-13-2006 06:55 PM

Quote:

Originally Posted by pixellany
Here's a little demo:

Code:

[root@mherring-w2k mherring]# mkdir play
[root@mherring-w2k mherring]# cd play
[root@mherring-w2k play]# ls
[root@mherring-w2k play]# mkdir "abc def"
[root@mherring-w2k play]# ls
abc def
[root@mherring-w2k play]# ls -l
total 4
drwxr-xr-x  2 root root 4096 Oct 13 15:14 abc def
[root@mherring-w2k play]# chown -R mherring "abc def"
[root@mherring-w2k play]# ls -l
total 4
drwxr-xr-x  2 mherring root 4096 Oct 13 15:14 abc def
[root@mherring-w2k play]#

I was able to make a directory named "abc def" and then change its owner using quotes.

This also works:

Code:

[root@mherring-w2k play]# chown -R root abc\ def
[root@mherring-w2k play]# ls -l
total 4
drwxr-xr-x  2 root root 4096 Oct 13 15:14 abc def
[root@mherring-w2k play]#

Here, I changed it again using "\" to escape the space in the file name.

Another trick is simply to use the wild card--as long as it is unique, you can access the directory of file name with the 1st few letters + "*". Thus, In my example,
Code:

chown -R name abc*
would also work


Thanks for all your efforts but I'm still completely confused and cannot get anything to work.

I'm seeing the folder in my Desktop, not my Home folder but when I open Terminal, it opens as:- yuio@yuio - desktop:-$ whereas I 'think' that should be yuio@yuio:-$

If so I've screwed up somewhere.

Kind regards.

Lewis.

*****

pixellany 10-15-2006 11:11 PM

I
Quote:

'm seeing the folder in my Desktop, not my Home folder but when I open Terminal, it opens as:- yuio@yuio - desktop:-$ whereas I 'think' that should be yuio@yuio:-$
Now I am confused...
What you describe above is simply the prompt that normally appears in a CLI (terminal).

Here is a line from you original post:
Quote:

yuio@yuio-desktop:~$ cd desktop
This means that you are running as user "yuio" on a system named "yuio-desktop", and that you are in your home folder (~) (trying to cd to desktop)

It appears that--in you more recent post, you may have a typo--ie the prompt should look more like the one in your original post.

When you cd to the Desktop, you should then see:
yuio@yuio-desktop:~/Desktop$

IndyGunFreak 10-16-2006 12:29 AM

Quote:

Originally Posted by limeylew
I have Dapper 6.06.1 and have a 'locked' folder on my desktop.

Its just a bunch of photos that I transferred from XP to Mepis and then to Ubuntu on a memory stick but I would appreciate it if someone would tell me (or point me to a link) how to get rid of the 'padlock'.

Thanks.

Lewis.

*****


I'm assuming you've tried Right Click/Properties/Permissions tab. Check all the boxes. I've unlocked a couple files like that.

IGF

limeylew 10-16-2006 05:25 AM

Quote:

Originally Posted by IndyGunFreak
I'm assuming you've tried Right Click/Properties/Permissions tab. Check all the boxes. I've unlocked a couple files like that.

IGF


WOW!! That was too easy. :-)

It worked like a charm.

Many thanks.

Lewis.

*****

limeylew 10-16-2006 05:32 AM

Quote:

Originally Posted by pixellany
I

Now I am confused...
What you describe above is simply the prompt that normally appears in a CLI (terminal).

Here is a line from you original post:

This means that you are running as user "yuio" on a system named "yuio-desktop", and that you are in your home folder (~) (trying to cd to desktop)

It appears that--in you more recent post, you may have a typo--ie the prompt should look more like the one in your original post.

When you cd to the Desktop, you should then see:
yuio@yuio-desktop:~/Desktop$

You are correct. Thanks for pointing that out.

Now its making more sense to me.

Kind regards.

Lewis.

*****


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