LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Operation not permitted when using mkdir (https://www.linuxquestions.org/questions/linux-hardware-18/operation-not-permitted-when-using-mkdir-308617/)

valkur 04-01-2005 09:44 AM

Operation not permitted when using mkdir
 
Okay, I am using INSERT off of the Ultimate Boot CD.

My goal is to try and copy all of the contents of my hard drive to an external USB hard drive.

At first when I clicked the button to mount the two drives it would mount them as read-only, so I couldn't copy anything.

Now I use the console and mount them myself with the mount command. Now they are mounted read-write.

But now when I try and copy it tells me

cp: cannon create directory 'sda1/hda1' : Operation not permitted.

So my question is how do I get the apporpriate privileges to perform the requested operation?

BACKGROUND:

The NTFS structure on my hard drive is corrupted and hence I am unable to boot windows or even use the XP CD's recovery console or repair install. What I am hoping to do is copy all of my important files to my external using INSERT and then just reformat and start all over with my main hard drive.

ALTERNATIVE:

I also have this program called Partition image which will copy an entire partition. But since my original partition is corrupted, if i tried to image it onto my external, wont the partition created on the external also be corrupted?

Thank you so much for any advice, this problem has been plaguing me for over two weeks:(

RobertP 04-01-2005 09:59 AM

Quote:

cp: cannon create directory 'sda1/hda1' : Operation not permitted.
You need write access to the directory where you are going to create the directory. If you have mounted the device on a directory with path /home/user/somepath/backup then the command would be
mkdir /home/user/somepath/backup/newdir or something like that. Have you verified a successful mount? Give the mount command with no arguments. Do ls -l fullpath to see the permissions for the directory where you are going to create the directory. To change permissions user chmod. To change ownership, user chown. See man chmod or chown

valkur 04-01-2005 10:28 AM

Okay it is mounted properly as this is returned when only mount is entered without arguments

/dev/hda1 on /mnt/hd1 type ntfs (rw)
/dev/sda1 on /mnt/sda1 type ntfs (rw)

Then when I do ls -l /mnt I get this


drwx------ 1 root root 4096 Apr 1 8:25 sda1

Checking another website I tried the following command

chmod a=rwx sda1

Now doing ls -l /mnt I get this

drwxrwxrwx 1 root root 4096 Apr 1 8:25 sda1

But now trying mkdir I still get Operation not permitted:cry:

Now what?

valkur 04-01-2005 12:57 PM

UPDATE

I think the reason why I am not permitted to make new directories or add files to my external is because of something in CMOS.

I disconnected my old hard drive and only left in my external, booted up with the XP CD and tried to install windows on the external but it said that it did not have access to it and that it might be possible to change a setting in CMOS to allow access.

This is strange though because before all of this my external was FAT32 and I was able to copy files and directories to it although not all of them because FAT32 is not entirely compatible with NTFS. How come after formatting to NTFS I was unable to make any changes to it anymore?

Is there really a setting somewhere in CMOS that I could change to rectify this? I am using Phoenix AwardBIOS on the Nvidia nForce Motherboard.

All help and advice is very much appreciated

RobertP 04-01-2005 06:25 PM

I suspect your problem may be NTFS. Some/most Linux distros do not write NTFS well. See
this link . You can trick that other OS to do the writing. Store the files in a more Linux friendly file system such as jfs, and serve them back to that other OS via samba or apache or even writing to a CD or DVD. If you need to manually copy them back, you may pack them into a zip archive to let unzip or winzip to put them back. Of course, if you are converting to Linux, life will be easier. No need to use NTFS ever again. ;)


All times are GMT -5. The time now is 10:39 AM.