PDA

View Full Version : why i can't create folder in filesystem?



ramimgh
5th April 2006, 02:05 AM
when i try mkdir, the response is permission denied, i can't do it.

Christy
5th April 2006, 02:08 AM
It depends where you're trying to make the directory. You need to be the owner (or in the group I think....) of the parent directory (ie. you should be able to do it in your home directory as a normal user, but probably not many other place)

ramimgh
5th April 2006, 02:15 AM
bu t i am the owner, should be in adm group to manage to do that, how can i switch to an administrator

Christy
5th April 2006, 02:17 AM
Where are you trying to make this directory? Like I said, if it's pretty much anywhere other than your home directory (/home/yourusername) then you need to be root to make it.

edit: sorry, forgot to say...

to become root, you type


su -

in the terminal and type your root password.

taurus
5th April 2006, 02:21 AM
bu t i am the owner, should be in adm group to manage to do that, how can i switch to an administrator
You can create whatever you want under ~/ which is your home directory. For instance, if your log in name is ramingh, then your home directory is /home/ramingh and you have all the permissions to do whatever you want in it. But if you want to create a directory say in /usr/local, then you need to be root since only root has the "power" to do everything to the system. So, better be real careful when you log in as root because one wrong command can render your system useless...

ramimgh
5th April 2006, 02:33 AM
thanx, that worked, but the reason i needed to create directory is to mount my fat32 win xp hard drive, i get this from logical volume management that hda is uninitiable , can anyone help with this

twiistedkaos
5th April 2006, 02:43 AM
thanx, that worked, but the reason i needed to create directory is to mount my fat32 win xp hard drive, i get this from logical volume management that hda is uninitiable , can anyone help with this

Type:


su -
fdisk -l /dev/hda

post what it says.

ramimgh
5th April 2006, 06:32 AM
[root@localhost ~]# fdisk -1 /dev/hda
fdisk: invalid option -- 1

Usage: fdisk [-b SSZ] [-u] DISK Change partition table
fdisk -l [-b SSZ] [-u] DISK List partition table(s)
fdisk -s PARTITION Give partition size(s) in blocks
fdisk -v Give fdisk version
Here DISK is something like /dev/hdb or /dev/sda
and PARTITION is something like /dev/hda7
-u: give Start and End in sector (instead of cylinder) units
-b 2048: (for certain MO disks) use 2048-byte sectors
[root@localhost ~]#

u-noneinc-s
5th April 2006, 06:36 AM
That was supposed to be fdisk -l (as in linux) not fdisk -1 (one)

ramimgh
5th April 2006, 06:28 PM
[rami@localhost ~]$ su -
Password:
[root@localhost ~]# fdisk -l /dev/hda

Disk /dev/hda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 4865 39078081 c W95 FAT32 (LBA)
/dev/hda2 4866 9728 39062047+ f W95 Ext'd (LBA)
/dev/hda5 4866 8689 30716248+ b W95 FAT32
/dev/hda6 8690 9728 8345736 b W95 FAT32
[root@localhost ~]#

twiistedkaos
5th April 2006, 06:35 PM
Since you can switch to admin now you can mkdir.



su -
mkdir /DIR
mount fat32 /dev/hda5 /DIR