LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-08-2011, 06:19 AM   #1
osdevkid
LQ Newbie
 
Registered: Mar 2011
Location: India, Chennai
Posts: 14

Rep: Reputation: 0
How to change the ownership of files mounted from floppy image


Dear All,

I have mounted a floppy image file as below

$> su
$> /sbin/losetup /dev/loop0 /mnt/win_e/images/grubdos.img
$> mkdir /mnt/floppy
$> mount /dev/loop0 -o loop /mnt/floppy

Floopy image mounted on "/mnt/floppy", now I have tried to create a file inside the floppy image, file created successfully, however I can not change the ownership of the file.

$> cd /mnt/floppy
$> touch hai.txt
$> ll hai.txt
-rwxr-xr-x 1 root root 0 Mar 8 17:29 hai.txt
$> chown user1:user1 hai.txt
chown: changing ownership of 'hai.txt': Operation not permitted

How to change the ownership of the file and folder in mounted floppy image ?
 
Old 03-08-2011, 06:42 AM   #2
ravikiran189
Member
 
Registered: Mar 2011
Posts: 45

Rep: Reputation: 4
Hi,
From the ls-ltr i see the file hai.txt has root as its group & owner. you didn't say what linux you are using. You need root privilages for changing the ownership

login to root and try

#chown user1:user1 hai.txt

or try with sudo command
$sudo user1:user1 hai.txt
 
Old 03-08-2011, 07:03 AM   #3
osdevkid
LQ Newbie
 
Registered: Mar 2011
Location: India, Chennai
Posts: 14

Original Poster
Rep: Reputation: 0
Thanks for your reply.

Quote:
need root privilages for changing the ownership

login to root and try
In the very first line itself, I have entered as root user.

Quote:
$> su
$> /sbin/losetup /dev/loop0 /mnt/win_e/images/grubdos.img
$> mkdir /mnt/floppy
$> mount /dev/loop0 -o loop /mnt/floppy

Quote:
or try with sudo command
$sudo user1:user1 hai.txt
I am using CentOS.
 
Old 03-08-2011, 08:21 AM   #4
ravikiran189
Member
 
Registered: Mar 2011
Posts: 45

Rep: Reputation: 4
hi,
Try using su - instead or login to root account and see if it works
 
  


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
floppy dir changes ownership when mounted mortyg Linux - Newbie 3 01-04-2009 12:49 PM
can't change permissions for samba mounted floppy fisayo Mandriva 2 04-20-2005 04:07 AM
Can't change ownership of files on windows partition alan_the_eagle Linux - Newbie 4 03-27-2005 03:35 AM
sudo: How can i change the ownership of particular files? anoopp Linux - Security 1 03-18-2005 02:03 AM
Howto change the ownership of mounted smb resource?? sys7em Linux - Newbie 4 12-23-2004 02:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:34 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