LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 05-02-2013, 07:58 AM   #1
nokia3310
LQ Newbie
 
Registered: May 2013
Posts: 18

Rep: Reputation: Disabled
can't run mkdir even as root please help


I cannot mkdir as root
please see below

Code:
[root@vm1 ~]# mkdir /home/vm1/Desktop/nfs
mkdir: cannot create directory `/home/vm1/Desktop/nfs': Permission denied
so i checked the selinux context below and got

Code:
[root@vm1 ~]# ls -Z /home/vm1
drwxrwxrwx. root root system_u:object_r:autofs_t:s0    Desktop
drwxr-xr-x. vm1  vm1  unconfined_u:object_r:user_home_t:s0 Documents
drwxr-xr-x. vm1  vm1  unconfined_u:object_r:user_home_t:s0 Downloads
drwxr-xr-x. vm1  vm1  unconfined_u:object_r:audio_home_t:s0 Music
drwxr-xr-x. vm1  vm1  unconfined_u:object_r:user_home_t:s0 Pictures
drwxr-xr-x. vm1  vm1  unconfined_u:object_r:user_home_t:s0 Public
drwxr-xr-x. vm1  vm1  unconfined_u:object_r:user_home_t:s0 Templates
drwxr-xr-x. vm1  vm1  unconfined_u:object_r:user_home_t:s0 Videos

Can someone tell me what is wrong here?
And yes i was trying to mount nfs using autofs at some point and wasn't running so seeing autofs there is confusing me..maybe it caused a problem somewhere...


also after the autofs problem i noticed the whole folders and files in /home/vm1/Desktop are all gone.

Please what happened?

Thanks
 
Old 05-02-2013, 08:04 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,850

Rep: Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309
in your other thread we could see you have mount problems. Actually that directory is blocked by your nfs server (or something similar). You need to fix you ip address conflict, exports and mounts otherwise you will experience further surprises.
 
Old 05-02-2013, 08:28 AM   #3
nokia3310
LQ Newbie
 
Registered: May 2013
Posts: 18

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
in your other thread we could see you have mount problems. Actually that directory is blocked by your nfs server (or something similar). You need to fix you ip address conflict, exports and mounts otherwise you will experience further surprises.
how do i fix this?
i think it was caused by the autofs as you can see in the context for the Desktop directory also i tried to chown and chgrp to vm1 for the Desktop directory but it didn't change at all either

What do i do to fix this and also what caused this?
 
Old 05-02-2013, 08:35 AM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,850

Rep: Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309
actually I do not know it, you need to open one single thread and go thru again. how to set up vm, its network, exports, mount. You will not be able to solve the last problem without the solving the first.
To help you we need your existing config: what you have, how is it really set up.
 
Old 05-02-2013, 08:40 AM   #5
nokia3310
LQ Newbie
 
Registered: May 2013
Posts: 18

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
actually I do not know it, you need to open one single thread and go thru again. how to set up vm, its network, exports, mount. You will not be able to solve the last problem without the solving the first.
To help you we need your existing config: what you have, how is it really set up.
one thing i can say is i have followed several tutorials including videos and documentations...name it i followed them all and yet i can't get these thing done...i mean Linux is really loosing the hype...the days of have the commands and you are fine are all over now its one problem or the other...its so frustrating

Sometimes i watch a video and follow everything exactly and yet not even close to the same results..its ridiculous
 
Old 05-03-2013, 12:38 AM   #6
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,850

Rep: Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309
The problem is that one single mistyped word or missed step may cause "serious" problems. You need to take care about all the steps one by one and check the result. You also ought to learn the steps why, what, how...
I need to say following a video tutorial without real knowledge about the backgrounds can be dangerous.

---------- Post added 3rd May 2013 at 07:39 ----------

The problem is that one single mistyped word or missed step may cause "serious" problems. You need to take care about all the steps one by one and check the result. You also ought to learn the steps why, what, how...
I need to say following a video tutorial without real knowledge about the backgrounds can be dangerous.
 
Old 05-03-2013, 12:59 AM   #7
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
This (pan64) x 1000

@OP: there are huge nums of systems that run eg nfs, autofs etc. It definitely works.

I agree with previous comments you'd be better off at this point just sticking with one thread and working your way through the issues.
One of the others says you've got nfs working ok, (iirc) so that's good.

Note that autofs does 'lazy mounting', which means a mount will not appear until you try to access it and will only remain visible for a limited time after you stop using it.
It doesn't mean its broken, its just more efficient for your system.
Remember (as I mentioned in another of your threads) that normally these services are used to mount between systems across LANs, not mounting to itself.

Both nfs and autofs clients rely on the server end doing the export, but only an nfs mount is permanent & thus usually specified in /etc/fstab.
As above, autofs is opportunistic and is specified elsewhere (as you've discovered).

Hope that helps
 
  


Reply



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
Sorry, user deploy is not allowed to execute '/bin/mkdir 1' as root on localhost sunnysthakur Linux - General 1 09-08-2012 04:42 PM
[SOLVED] mkdir: cannot creat directory. How to enable mkdir for user in usb dir? Foxbat1155 Linux - Newbie 13 02-16-2012 11:20 AM
how to give options like '-v' for mkdir using system call mkdir() ? nehapawar Linux - Newbie 2 02-05-2010 02:13 AM
mkdir with root privileges slam Programming 3 09-29-2006 05:22 PM
mkdir in / with out being root Gustaf Slackware 5 10-21-2004 02:39 PM

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

All times are GMT -5. The time now is 07:32 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
Open Source Consulting | Domain Registration