Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place. |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
06-10-2012, 01:38 AM
|
#1
|
Member
Registered: Mar 2012
Distribution: Debian for server, CrunchBang for everything that's not a server
Posts: 143
Rep:
|
Copying files in an admin account from an account with insufficient permissions?
Hello,
A few months ago, I ran into a distressing problem with my primary (administrator) account on my existing installation of elementary OS Jupiter: in the middle of using Rhythmbox, the mouse cursor froze entirely, and the keyboard stopped working. This made the admin account more-or-less unusable, as upon logging in the mouse and keyboard immediately stopped working.
Since the surfacing of this issue, I have not been using the admin account; instead, I have been using a non-privileged secondary account created while I still had access to the primary account.
This lockout of my admin account means that I can't access about half of my files. When navigating from the secondary account's Home folder to the root of the file system, to the admin account's Home folder and then to the subfolders therein, I see that a large number of files are marked as having insufficient permissions for use on the secondary account.
This, and other problems with elementary OS have caused me to make a decision to switch Debian 6.0.5. However, I cannot switch until I can copy my full admin and secondary accounts' Home folders.
Is there some way I can manipulate the permissions of the admin account's Home folder from the non-privileged account, or copy my full Home folders some other way?
Thank you,
Lawrence
|
|
|
06-10-2012, 01:51 AM
|
#2
|
LQ Guru
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,726
|
Hi,
sounds like a problem with the gui config for that account. Is there anything stopping you from using su in a terminal to change to that user? Or even just logging in as that user on a console (eg Ctrl-Alt-F1)? Then you can do whatever you want including adding your "non-priveged" account to the adm group.
Eg
Code:
su -l adminuser
usermod -a -G admin nonprivuser
Where "adminuser" and "nonprivuser" are the usernames.
Then log out and log back in agina as nonprivuser and you should be able to sudo to gain root privs.
Evo2.
PS. All this is assuming that "elementary OS Jupiter" behaves like a standard Ubuntu system (which seems to be the case with the majority of Ubuntu derived/rebranded/extrapackages "distros").
|
|
1 members found this post helpful.
|
06-10-2012, 12:42 PM
|
#3
|
Moderator
Registered: Mar 2008
Posts: 22,361
|
I'd wonder about the filesystem, memory, hard drive or other data issue.
Admin accounts don't usually sort of work.
Might boot to a live cd to peek into it and move it.
Any terminal or console should allow you to use su unless it has been blocked by disto or other. sudo some file manager may work but a live cd usually is a way to access it.
Last edited by jefro; 06-10-2012 at 12:45 PM.
|
|
|
06-10-2012, 01:18 PM
|
#4
|
Member
Registered: Mar 2012
Distribution: Debian for server, CrunchBang for everything that's not a server
Posts: 143
Original Poster
Rep:
|
Quote:
Originally Posted by evo2
Hi,
sounds like a problem with the gui config for that account. Is there anything stopping you from using su in a terminal to change to that user? Or even just logging in as that user on a console (eg Ctrl-Alt-F1)? Then you can do whatever you want including adding your "non-priveged" account to the adm group.
Eg
Code:
su -l adminuser
usermod -a -G admin nonprivuser
Where "adminuser" and "nonprivuser" are the usernames.
Then log out and log back in agina as nonprivuser and you should be able to sudo to gain root privs.
Evo2.
PS. All this is assuming that "elementary OS Jupiter" behaves like a standard Ubuntu system (which seems to be the case with the majority of Ubuntu derived/rebranded/extrapackages "distros").
|
Thank you for your help. I tried your solution, but it didn't seem to work. Am I doing something wrong?
Code:
Ubuntu 10.10 Dawn ttyl
Dawn login: lawrence
Password:
run-parts: failed to exec /etc/update-motd.d/10-help-text: Exec format error
run-parts: /etc/update-motd.d/10-help-text exited with return code 1
Linux Dawn 2.6.35-32-generic #67-Ubuntu SMP Mom Mar 5 19:35:26 UTC 2012 i686 GNU/Linux
elementary-jupiter
0 packages can be updated.
0 updates are security updates.
lawrence@Dawn:~$ su -l lawrence
Password:
lawrence@Dawn:~$ usermod -a -G admin mom
Command 'usermod' is available in '/usr/sbin/usermod'
The command could not be located because 'usermod' is not included in the PATH environment variable.
This is most likely caused by the lack of administrative privileges associated with your user account.
usermod: command not found
lawrence@Dawn:"$
Please note that the above session record was hand-transcribed and may contain errors.
I did try the plain-and-simple GUI route (System>Administration>Users And Groups>enter admin password>Change user mom to administrator), but this is not giving me the necessary permissions to access my files either, although I can now sudo in Terminal. Is there some Terminal route for mass-changing file permissions/ownership to mom from lawrence, or to give all users access to read/write permissions on given folders? chmod?
Quote:
Originally Posted by jefro
I'd wonder about the filesystem, memory, hard drive or other data issue.
Admin accounts don't usually sort of work.
Might boot to a live cd to peek into it and move it.
Any terminal or console should allow you to use su unless it has been blocked by disto or other. sudo some file manager may work but a live cd usually is a way to access it.
|
I did try booting to a live CD of Ubuntu 10.04 that a friend had, and it showed exactly the same behavior as my elementary OS installation.
Thanks,
Lawrence
Last edited by nobuntu; 06-10-2012 at 01:20 PM.
|
|
|
06-10-2012, 06:40 PM
|
#5
|
LQ Guru
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,726
|
Hi,
did you read the error message?
Try:
Code:
/usr/sbin/usermod -a -G admin mom
Cheers,
Evo2.
|
|
|
06-10-2012, 07:34 PM
|
#6
|
LQ Guru
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,726
|
Hi,
opps, seems I did not read enough of your last post.
Quote:
Originally Posted by R3nCi
System>Administration>Users And Groups>enter admin password>Change user mom to administrator), but this is not giving me the necessary permissions to access my files either, although I can now sudo in Terminal.
|
Ok, so looks like you were able to do the equivalent of usermod command using the gui. Good.
Quote:
Is there some Terminal route for mass-changing file permissions/ownership to mom from lawrence, or to give all users access to read/write permissions on given folders? chmod?
|
Yes. In fact I don't know of any other way (but avoid guis whenever I can). chmod is used for changing the permissoins, chown for changing the ownership.
Eg. if you want to change the owner to lawrence and the group to lawrence for all files/directories under /home/mom you could run the following:
Code:
chown -R lawrence.lawrence /home/mom
Or if you wanted to make all files and directories under /home/mom to be readable by everyone (including lawrence) you could do
Code:
chmod -R a+r /home/mom
HTH,
Evo2.
|
|
|
06-14-2012, 09:59 PM
|
#7
|
Member
Registered: Mar 2012
Distribution: Debian for server, CrunchBang for everything that's not a server
Posts: 143
Original Poster
Rep:
|
Quote:
Originally Posted by evo2
Eg. if you want to change the owner to lawrence and the group to lawrence for all files/directories under /home/mom you could run the following:
Code:
chown -R lawrence.lawrence /home/mom
Or if you wanted to make all files and directories under /home/mom to be readable by everyone (including lawrence) you could do
Code:
chmod -R a+r /home/mom
HTH,
Evo2.
|
Thank you very much; I will try running these Friday evening. 
|
|
|
07-01-2012, 04:00 PM
|
#8
|
Member
Registered: Mar 2012
Distribution: Debian for server, CrunchBang for everything that's not a server
Posts: 143
Original Poster
Rep:
|
Quote:
Originally Posted by R3nCi
Thank you very much; I will try running these Friday evening. 
|
Well, I finally got around to running the commands you suggested. Unfortunately, I was not met with success.
Quote:
chmod: invalid mode: 'atr'
|
I have 101 GB of data in that account, a decent amount of which I cannot access. Music (including original works), photography, video footage, etc. I need to be able to get to it in order to back up my HDD for an impending move to Debian 6.0.5, as the current version of elementary OS is based on Ubuntu 10.10 and since 10.10 is EOL, I cannot get important security updates - obviously not a good situation.
Thank you for any help you can provide.
Lawrence
|
|
|
07-01-2012, 07:57 PM
|
#9
|
LQ Guru
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,726
|
Hi,
it is "a+r" not "atr".
Evo2.
|
|
|
07-02-2012, 06:14 PM
|
#10
|
Member
Registered: Mar 2012
Distribution: Debian for server, CrunchBang for everything that's not a server
Posts: 143
Original Poster
Rep:
|
Quote:
Originally Posted by evo2
Hi,
it is "a+r" not "atr".
Evo2.
|
Oh, haha. Epic fail on my part. Sorry! I'll try running this again soon, and report back with the results. Wish me luck!
|
|
|
07-03-2012, 12:22 AM
|
#11
|
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.x
Posts: 18,434
|
To clarify, a+r = all+read 
HTH
|
|
|
07-08-2012, 04:02 PM
|
#12
|
Member
Registered: Mar 2012
Distribution: Debian for server, CrunchBang for everything that's not a server
Posts: 143
Original Poster
Rep:
|
Quote:
Originally Posted by chrism01
To clarify, a+r = all+read 
HTH
|
Hello,
I tried running this, and something extremely strange happened. The console/terminal was running through everything in my home directory, attempting to change the permissions, and each and every item showed a Operation Not Permitted error. The account I was running the commands from (lawrence) was an administrator account. Neither it nor "mom" would allow me to execute the command correctly.
I rebooted the system, and when trying to run the command again, only one file was on the screen as having its permissions changed, and it too left me with an Operation Not Permitted error.
If you are having trouble understanding this, I can make a short video showing exactly what is happening. I'm off to lunch right now, but will check for your (or any!) response when I return.
I don't know what do from this point forward. I can't get my data, my computer is not getting security updates, so I am essentially stuck in a cycle of Permission Denied, Permission Denied.
Thank you very much for all your help so far.
Lawrence
Last edited by nobuntu; 07-08-2012 at 04:55 PM.
|
|
|
07-08-2012, 05:40 PM
|
#13
|
Senior Member
Registered: Jan 2010
Location: SI : 45.9531, 15.4894
Distribution: CentOS, OpenNA/Trustix, testing desktop openSuse 12.1 /Cinnamon/KDE4.8
Posts: 1,144
|
Hi Lawrence
I'm sorry getting to this thread without Ubuntu (jupiter) knowledge, but reading the posts I wonder if you could
open a terminal window and become "root" user (like in most Linux distros) which would possibly help you to save the files you need.
What do you think about it - evo2 ?
Usually you become "root" user with:
Code:
# sudo su -
and then entering "root" user's password or the "username" password (can be your mom or lawrence's)
or it can be:
# su -
looking here is an explanation of "su"
then you could change permissions and owner of your files
Code:
# cd /home/lawrence
# chmod -vR 777 foldername_you_want_access/
and this is again like "evo2" wrote, change "owner"
# chown -R mom.mom foldername_you_want_access/
this should change file/folder permissions for "anyone" to read/write/execute.
There is a possibility you will break something with "chown" command,
... what comes about to my mind is that you can't access your (lawrence's) files from "mom's" account login
is that "lawrence's" home and all other directories are owned by that user and probably don't have permissions for others to "read/execute" them.
So it probably needs to have change the permissions for "lawrence's" home (again by "root")
Code:
# chmod 777 /home/lawrence
which will allow any other user to open "lawrence's" directory (but not any other subdir.. - if you need it -- change that too).
I hope it will work for you.
Last edited by lithos; 07-08-2012 at 05:49 PM.
|
|
1 members found this post helpful.
|
07-13-2012, 11:30 PM
|
#14
|
Member
Registered: Mar 2012
Distribution: Debian for server, CrunchBang for everything that's not a server
Posts: 143
Original Poster
Rep:
|
Quote:
Originally Posted by lithos
Hi Lawrence
I'm sorry getting to this thread without Ubuntu (jupiter) knowledge, but reading the posts I wonder if you could
open a terminal window and become "root" user (like in most Linux distros) which would possibly help you to save the files you need.
What do you think about it - evo2 ?
Usually you become "root" user with:
Code:
# sudo su -
and then entering "root" user's password or the "username" password (can be your mom or lawrence's)
or it can be:
# su -
looking here is an explanation of "su"
then you could change permissions and owner of your files
Code:
# cd /home/lawrence
# chmod -vR 777 foldername_you_want_access/
and this is again like "evo2" wrote, change "owner"
# chown -R mom.mom foldername_you_want_access/
this should change file/folder permissions for "anyone" to read/write/execute.
There is a possibility you will break something with "chown" command,
... what comes about to my mind is that you can't access your (lawrence's) files from "mom's" account login
is that "lawrence's" home and all other directories are owned by that user and probably don't have permissions for others to "read/execute" them.
So it probably needs to have change the permissions for "lawrence's" home (again by "root")
Code:
# chmod 777 /home/lawrence
which will allow any other user to open "lawrence's" directory (but not any other subdir.. - if you need it -- change that too).
I hope it will work for you.
|
This worked perfectly. Thank you so much! 
|
|
|
07-14-2012, 02:14 AM
|
#15
|
Senior Member
Registered: Jan 2010
Location: SI : 45.9531, 15.4894
Distribution: CentOS, OpenNA/Trustix, testing desktop openSuse 12.1 /Cinnamon/KDE4.8
Posts: 1,144
|
Great ! I'm glad you can get your files back.
|
|
|
All times are GMT -5. The time now is 08:27 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|