LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   mkdir permission denied (https://www.linuxquestions.org/questions/linux-newbie-8/mkdir-permission-denied-348441/)

rmorgan1016 07-30-2005 07:06 PM

mkdir permission denied
 
Hi All,

As a new Linux user, I find myself stuck more or less right out of the box. I hope this isn't overly verbose, but the forum says to post as much detail as possible!

I'm trying to make my wireless LAN card work, and as part of the instructions I've been given I need to set up my WindowsXP partition (I guess 'mount' is the appropriate term) such that I can get the drivers on to the Linux partition.

I have an ubuntu distro.

I log on as me (randall), not as root, because from what I've read it's not a good idea for somebody who doesn't know what they're doing to log on as root, as they can cause all kinds of damage. I don't even know how to log in as root, although I suppose I could figure it out.

The first thing to do on my list of instructions is to make a directory in /mnt called /win so I have a place to mount the Windows partition.

I opened a Terminal session from the GNOME menu, and got this prompt:

randall@ubuntu:~$

I changed to the root of my file system (I think) by typing 'cd /', and got this prompt:

randall@ubuntu:/$

I then did 'ls -alt' and saw that there is a directory called mnt. Next I typed the exact command given in my instructions, so before I hit Enter the command line said:

randall@ubuntu:/$ mkdir /mnt/win

I got this error message:

mkdir: cannot create directory '/mn/win': Permission denied

I tried moving around to various places within my directory tree and using mkdir, but always got some variation of that same error message.

It seems trivially simple that I don't have permission to make directories in my own structure, but that just seems odd. From within GNOME, I went to System -> Administration -> Users & Groups, entered my password, and got a box that listed 'randall' as a user. When I clicked on Properties I got a box with a series of items, and all but something have to do with access to tape drives were checked, including one that says 'Executing system administration tasks'.

So, it seems that randall is set up as a sysadmin, and surely one of those can create a directory, right? I'm stumped. As I said earlier, I'd rather not log in as root if I don't have to, because it seems as likely as not I'll break something. Of course, if I do break something I guess the good news I haven't really done anything with Linux yet and can re-install the whole thing from CD without losing any data.

Thanks in advance for reading this far.

Randy

leonscape 07-30-2005 07:19 PM

What you need to do is

cd /mnt
sudo mkdir win

And enter your password. Only root can mount stuff, and only root can make directories outside a home directory ( There are exceptions but this is generally so ). "sudo" enables you as a user to pretend to be root for a specific command. If you type "sudo su" then you become root, until you type "exit"

You need to be root sometimes to do important stuff.

rmorgan1016 07-30-2005 08:46 PM

Thanks...I hope I'm not back too often with inane questions like this one.

Randy


All times are GMT -5. The time now is 01:42 PM.