No access rights to delete or move files after re-install and moving from user folder
UbuntuThis forum is for the discussion of Ubuntu Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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.
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.
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
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.
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 :-)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.