LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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, 08: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, 09:04 AM   #2
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 8,505

Rep: Reputation: 2434Reputation: 2434Reputation: 2434Reputation: 2434Reputation: 2434Reputation: 2434Reputation: 2434Reputation: 2434Reputation: 2434Reputation: 2434Reputation: 2434
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, 09: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, 09:35 AM   #4
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 8,505

Rep: Reputation: 2434Reputation: 2434Reputation: 2434Reputation: 2434Reputation: 2434Reputation: 2434Reputation: 2434Reputation: 2434Reputation: 2434Reputation: 2434Reputation: 2434
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, 09: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, 01:38 AM   #6
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 8,505

Rep: Reputation: 2434Reputation: 2434Reputation: 2434Reputation: 2434Reputation: 2434Reputation: 2434Reputation: 2434Reputation: 2434Reputation: 2434Reputation: 2434Reputation: 2434
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, 01:59 AM   #7
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,260

Rep: Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328
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


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


All times are GMT -5. The time now is 02:37 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration