LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices

Reply
 
Search this Thread
Old 01-16-2010, 07:33 AM   #1
sonicboy
Member
 
Registered: Mar 2009
Posts: 72

Rep: Reputation: 15
No access rights to delete or move files after re-install and moving from user folder


First of all, sorry for the long title but didn't know how to describe it in another way:-)

So, here is my problem: I've reinstalled my kubuntu 9.10 on my laptop and tried to re-use the user folder from my previous installation. But this didn't succeed as he could not open the home folder (probably due to updates or something). So, I've made a new user folder and moved all my personal files via using 'sudo konqueror' in a terminal.
But when I try to move, delete, ... a file via dolphin, the delete option is grayed out or in it tells me that I don't have access rights.

When looking to the properties of a file, I see that it is indeed created by another user (mostly it says user 500, whilst I've never used that name, in other cases it is my other login name)so that could be the explanation that I cannot manipulate the files.

I know i could with using a terminal or such, but I'm just an ordinary user who prefers an ui.
So, is there a possibility to move the files to my new user folder without having the limitations on permission rights?

Help is much appreciated!

cu
 
Old 01-16-2010, 07:58 AM   #2
10110111
Member
 
Registered: Jun 2008
Location: St.-Petersburg, Russia
Distribution: (B)LFS, Ubuntu, SliTaz
Posts: 402

Rep: Reputation: 51
Well, if you need a GUI for this... try using konqueror or whatever starting it as root, e.g. sudo konqueror. Though, i would never recommend starting GUI programs as root. Then just go to the directory where your files are located and change their owner to yourself. Better is to change owner only of the files which are owned by user 500, because there may be some files which are owned by root, but this would require some knowledge of command line.
 
Old 01-16-2010, 08:48 AM   #3
tommcd
Senior Member
 
Registered: Jun 2006
Location: Philadelphia PA USA
Distribution: Lubuntu, Slackware
Posts: 2,230

Rep: Reputation: 288Reputation: 288Reputation: 288
Was this your home directory? Or was it a different directory where you stored your files?
You could have just opened a terminal and used the chown command like this. First, cd into the directory where the problematic directory (or folder) is located:
Code:
cd /path/to/directory
Then run:
Code:
sudo chown -R your_user_name:users directory-name
Where directory-name is the name of the directory you want to change ownership of.
This will return ownership of the directory to your_user_name. The -R option will make chown work recursively on all sub-directories within the problematic directory.
You should not do this with system files and directories. Only use this for directories that have your personal files in them.

Last edited by tommcd; 01-16-2010 at 08:52 AM.
 
Old 01-16-2010, 01:50 PM   #4
sonicboy
Member
 
Registered: Mar 2009
Posts: 72

Original Poster
Rep: Reputation: 15
Hi,

It is indeed my home directory. I did the following: I copied everything to my external hd, deleted it on my other user directory and then copied it to my new user directory. May be a little odd, but it seems to do the trick:-).

Only for some files, like on my usb stick i still have no permission rigths to. I'll use your tricks to fix this

thanks for the help!
 
Old 01-17-2010, 09:14 AM   #5
tommcd
Senior Member
 
Registered: Jun 2006
Location: Philadelphia PA USA
Distribution: Lubuntu, Slackware
Posts: 2,230

Rep: Reputation: 288Reputation: 288Reputation: 288
Quote:
Originally Posted by sonicboy View Post
Only for some files, like on my usb stick i still have no permission rigths to. I'll use your tricks to fix this
Is your /home directory on a separate partition from your root directory?
If so, then when you reinstalled Kubuntu, if you chose manual partitioning and selected your /home partition as /home for the reinstall, you should have had ownership of your old home directory. If you chose a different mount point for the directory though, it is possible that K/Ubuntu did not grant you ownership of that directory.

When you plug in the usb stick, does it automount and open up the contents of the usb stick automatically in a folder window? This is how it always works for me in Ubuntu.
If you don't have write access to the usb stick then you can just chown the mount point for it you should be good. For example:
Code:
sudo chown -R your_username:users /media/disk
or wherever Kubuntu decides to mount it. It is always /media/disk for me.
I don't know why you don't get write access to the usb stick though.
Remeber, only use chown and chmod on directories that have your personal data on them. Don't use them on system files and directories, unless you have a very good reason for doing so. Altering permissions of system files can lead to problems and security risks.

Last edited by tommcd; 01-17-2010 at 09:16 AM.
 
Old 01-18-2010, 04:28 AM   #6
sonicboy
Member
 
Registered: Mar 2009
Posts: 72

Original Poster
Rep: Reputation: 15
Quote:
Is your /home directory on a separate partition from your root directory?
If so, then when you reinstalled Kubuntu, if you chose manual partitioning and selected your /home partition as /home for the reinstall, you should have had ownership of your old home directory. If you chose a different mount point for the directory though, it is possible that K/Ubuntu did not grant you ownership of that directory.
Yes, my home directory is on a separate partition (i thought this always needs to be a separate partition?) and I selected the mount point manually. But when i re-installed kubuntu, it couldn't boot from this home directory (don't know how, in the past i've also have re-installed linux and used the same home directory and it worked). So then i decided to make a new user and copy all the files to this directory, think it must have to do something with this..

About my usb, i tried to change the user manually with konqueror but didn't succeed because some error. Then I decided to do the same trick as with my home directory, namely copying everything to my hd and then copying it back. Next time I'll use your command line, didn't know how what options to use on myself :-)

thx for the help
 
  


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
moving files from a location to other, preventing to move incomplete files pogo123 Programming 8 11-14-2008 07:21 AM
moving files from a location to other, preventing to move incomplete files pogo123 Linux - Newbie 2 11-13-2008 02:57 PM
How to automatically move files from one folder into another folder? xmrkite Linux - Software 6 11-05-2006 11:39 AM
Chmod rights and folder access fieldyweb Linux - General 3 08-24-2005 05:12 AM
user rights when creating a new folder Menestrel Linux - Newbie 3 11-14-2004 06:06 AM


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