LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 12-10-2004, 11:49 AM   #1
0perat0r
Member
 
Registered: Jul 2004
Location: New Jersey, US
Distribution: Red Hat Linux WS version 3
Posts: 126

Rep: Reputation: 15
trouble changing permissions


I have a file that I've been trying to change the permissions on so that I can copy it from a floppy. I have changed the ownership and group, but I still cannot copy it. It is somehow protected. I tried changing the permissions using chmod, but I got the following result:

[root@redvaio floppy]# chmod u=rwx,g=rwx,o=rwx jobs
chmod: changing permissions of `jobs' (requested: 0777, actual: 0755): Operation not permitted

What does this message mean? Is there a way around this? Thanks in advance.
 
Old 12-10-2004, 11:52 AM   #2
jeffreybluml
Member
 
Registered: Mar 2004
Location: Minnesota
Distribution: Fedora Core 1, Mandrake 10
Posts: 405

Rep: Reputation: 30
This may be a silly question, but is the floppy write protected? If not, then the issue may be in your /etc/fstab file. I'd check the floppy first though...

Oh, and to shorten up your command a little, you can do:

chmod ugo+rwx

Just FYI...
 
Old 12-10-2004, 12:00 PM   #3
0perat0r
Member
 
Registered: Jul 2004
Location: New Jersey, US
Distribution: Red Hat Linux WS version 3
Posts: 126

Original Poster
Rep: Reputation: 15
No, that's not a dumb question That's actually the first thing I checked, so it's not write protected. I cannot copy the file from the floppy to a Windows system either. The thing is, I have other files on there that I can copy, no problem. The file was created on a work computer, which I think has something to do with it. It's silly, because it's not like it is secret company information, or anything. It's actuall a word document with some job postings I got from Monster. I changed the file type to "all files" before I booted up Linux and tried it that way. I'm curious what the automount (/etc/fstab) has to do with it?

Thanks
 
Old 12-10-2004, 12:06 PM   #4
jeffreybluml
Member
 
Registered: Mar 2004
Location: Minnesota
Distribution: Fedora Core 1, Mandrake 10
Posts: 405

Rep: Reputation: 30
I figured fstab may be setting the permissions wierd or something, perhaps making it owned by another user or whatnot. Although, if you can SEE the file, I don't know why it wouldn't let you COPY it, unless you were trying to erase it from the floppy as well. Now, if you were trying to paste the copied file into a directory to which you don't have write permissions, that would make sense. Howver, I doubt you're doing that...

Now, the execute permission has no effect on copying something, right? Just the read permission....correct?

Man, I guess I don't know why it's giving you this issue....sorry....

I'll think on it for a bit...
 
Old 12-10-2004, 12:19 PM   #5
0perat0r
Member
 
Registered: Jul 2004
Location: New Jersey, US
Distribution: Red Hat Linux WS version 3
Posts: 126

Original Poster
Rep: Reputation: 15
Thanks for your feedback. I copy files into this directory all of the time without difficulty. The contents of my fstabs is:

LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
/dev/hda3 swap swap defaults 0 0
/dev/cdrom /mnt/cdrom udf,iso9660 noauto,owner,kudzu,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0

I used the su command in the terminal, to do all of the changes as root. Maybe the file is corrupted, but my suspicion is that it has been protected in some way. If I try to give anyone but the owner (i.e.: group, others) write permission through the Red Hat GUI, it does not work. It does not allow me to put a check in that box in the file properties. This is really strange (and frustrating). I appreciate your help.
 
Old 12-10-2004, 12:26 PM   #6
jeffreybluml
Member
 
Registered: Mar 2004
Location: Minnesota
Distribution: Fedora Core 1, Mandrake 10
Posts: 405

Rep: Reputation: 30
Try changing the fstab entry to allow any user to mount/unmount etc...like this:

/dev/fd0 /mnt/floppy auto noauto,users,kudzu 0 0

Worth a shot anyways....
 
Old 12-10-2004, 01:11 PM   #7
0perat0r
Member
 
Registered: Jul 2004
Location: New Jersey, US
Distribution: Red Hat Linux WS version 3
Posts: 126

Original Poster
Rep: Reputation: 15
I tried that, and no dice. Thanks for the suggestion, anyway.
 
Old 12-10-2004, 01:17 PM   #8
jeffreybluml
Member
 
Registered: Mar 2004
Location: Minnesota
Distribution: Fedora Core 1, Mandrake 10
Posts: 405

Rep: Reputation: 30
Geez!

Well, although in saying this I am admitting defeat, are you able to get another copy of the file and see if the one you're currently working with got corrupted somehow?

Sorry, wish I had more....
 
Old 12-10-2004, 01:39 PM   #9
0perat0r
Member
 
Registered: Jul 2004
Location: New Jersey, US
Distribution: Red Hat Linux WS version 3
Posts: 126

Original Poster
Rep: Reputation: 15
That's OK. It may be that the file is just somehow corrupted. I cannot get another copy because it is on a workstation at a job site where they ended my contract yesturday I'm curious if there is a way to lock down file permissions through a Windows policy or something... It's an interesting challenge, in any case. I tried manipulating the file on a Linux system because there's so much more control over permissions. More and more I am not liking Windows.
 
Old 12-11-2004, 01:45 AM   #10
sonajiso
Member
 
Registered: Oct 2003
Posts: 34

Rep: Reputation: 15
Another attempt - cheap, I may add

Before I start, I must let you know that I am new to Linux, and know very little about computers. Thus, what I write here will probably be useless.

You may have already done this, otherwise try:
- Login as root in a terminal
- Mount the floppy
- Now asume that you mounted the floppy into the directory /a/b/c/d
- chmod -R 777 /a/b/c/d - access to all, but recursively applies on the folder, that is contents of the floppy.
- May take a while........
- try reading the file you want

If this fails and you still want your file, you might be able to recover some of the data, but I must warn you, this method is as messy as dangerous and time consuming. Additionally, you might not be able to decypher any of the information - not because it is encrypted or something, but you will need to use a sharp tool to carve out the goodies from the corrupt filesystem (Aprox 4000 useful Bytes or whatever your file size is from 14000000 Bytes of 'garbage').So be adwised, do this at your own risk / pain - the dd ( for ddanger ) part in particular one typo can mean your system.
Still reading? That's the spirit! Here we go:

- Have root priviliges
- If your floppy device is /dev/floppy and your home directory is /home/0perat0r/, type
- dd if=/dev/floppy of=/home/0perat0r/floppy.img bs=512 count=2880
- Now hope grep - or some other tool you might use / develop ( find better ones or program one for this particular purpose for yourself [this last one is the Linux way] depending on how valuable your info is ) - can recover chunks of the data on the floppy.

A little clarification: using dd, following the above example you can take a raw image of your floppy disk - if it has no corrupt sectors, that is - and save this image in a single file - in the above example floppy.img in your home directory.
More on dd at man dd . Just to point out, if you do cat or vi on floppy.img you will be able to look at plain text so might be able to recover some of your Monster links just by looking at this dump - I mean the dump of the contents of your disk.

AGAIN, BE ABSOLUTELY REALLY VERY CAREFUL WHAT YOU DO WITH dd UNDER ROOT!!! It can make filesystems disappear! You probably do not want that.

I stop now, before I cause you to kill your system. Furthermore I do not want to confuse you too much
if you are uncertain what I have shown you here, please repply before continuing
Please feel free to ask me if you have any further questions.
 
Old 07-24-2005, 12:52 PM   #11
channi97
LQ Newbie
 
Registered: Jul 2005
Location: Aberdeen
Distribution: openSUSE10.2
Posts: 9

Rep: Reputation: 0
sonajiso, if you know little about computers, I know less than nothing.

I have a similar question: I have successfully copied a file from a floppy into my home folder, but I would like to put it in the /usr/games or /usr/share folder.
The message is 'You do not have permission.'
As I am coming from Windows, I imagine there should be a way to log into the GUI as an adminstrator, to have all the privileges one can dream of.
I know how to log in as root in a terminal, but from then on I'm lost.

I have recently spent about two days trying to log into my linux installation after adding a harddrive, and this is too long for being useful.
Linux has still a long way to go to become as 'easy' to handle as Windows, and it will only be achieved if you can live with linux without command line. I would like to belong to the select few who can handle this (because they are not doing anything else but work with computers) but I can't afford the time.

Well, may be there is a good reason why it doesn't let me copy my file into /usr. It knows me better than I do.
 
Old 07-24-2005, 02:13 PM   #12
maginotjr
Member
 
Registered: Aug 2004
Location: BR - Floripa
Distribution: Ubuntu 9.10 - 2.6.x.x
Posts: 661

Rep: Reputation: 35
I think linux can be hard as windows if you have never seen both before... but this is other discussion...

first you need to be root to copy something elsewhere that is not your home folde (/usr/games or /usr/share)

to login as root you just need to type root and the password at your login manager screen. Or you could login as root in the Console them run the application you want, eg: konqueror or nautilus or xffm and so on...

if you're login direct without any question about what user you want to go you may search in the forum about "changing automaticly login" or something like that...


---

Now about the floppy, try add the follow parameter on you fstab:
Code:
/dev/fd0 /mnt/floppy auto noauto,users,kudzu,rw 0 0
now umount and mount again to see what you get. I realy think you have some problem with your floppy, what is very normal, because you said you cant copy from windows too, and windows only have restriction if the floppy is write protected...

[ ]'s
 
Old 07-24-2005, 08:32 PM   #13
tkedwards
Senior Member
 
Registered: Aug 2004
Location: Munich, Germany
Distribution: Opensuse 11.2
Posts: 1,549

Rep: Reputation: 52
Quote:
As I am coming from Windows, I imagine there should be a way to log into the GUI as an adminstrator
Umm.. have you tried loggin in as root from the login screen? This will work but its not ideal due to the ease with which you can mess-up your system.

The best way is to start the indivdual programs as root while logged in as yourself. So if you use KDE you can start a konqueror instance by going Menu->Run Command and typing 'kdesu konqueror'. You could also open a terminal, type 'su' type in the root password and then type 'konqueror' to get the same effect.
 
Old 07-25-2005, 03:50 AM   #14
channi97
LQ Newbie
 
Registered: Jul 2005
Location: Aberdeen
Distribution: openSUSE10.2
Posts: 9

Rep: Reputation: 0
Thank you for your helpful advice, but...

It sounds so logical I wonder why I didn't think of it myself.
I tried, and

bash: nautilus: command not found

I also tried some other suggested programs, all with the same result.

What could the reason be for this?

By the way, I'm using Gnome Desktop.
 
Old 07-25-2005, 04:11 AM   #15
channi97
LQ Newbie
 
Registered: Jul 2005
Location: Aberdeen
Distribution: openSUSE10.2
Posts: 9

Rep: Reputation: 0
And more:

I have tried again and discovered that

If I log in as su the promt looks like this:

linux: /channi/home #

I type in

nautilus

then I get:

bash: nautilus: command not found

but in the logout state the command line looks like this:

channi@linux~>

I type in

nautilus

and then nautilus starts, but of course without the root privileges.

How do I run nautilus as su?
 
  


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
Changing Permissions jong357 Linux - General 5 01-25-2005 02:39 PM
changing permissions sy-co Mandriva 5 04-16-2004 10:13 AM
Changing permissions NomDeGuerre Linux - Newbie 10 03-10-2004 11:55 AM
Changing Many Permissions at Once food188 Linux - General 3 11-02-2003 08:17 AM
changing permissions... ashesh Linux - General 3 08-15-2003 11:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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