LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Write permissions (https://www.linuxquestions.org/questions/linux-newbie-8/write-permissions-189516/)

kougar 06-03-2004 10:44 PM

Write permissions
 
Installed Mandrake 10.0 Official earlier today, completely new to Linux.
I can view files on my floppy drive, but not write. How can I change permissions to allow me to do so? I don't know much yet, so the furthest I've gotten is looking at permissions under properties, and finding everything grayed out.
I'm not sure what other information is needed. Let me know.
Thanks

bruno buys 06-03-2004 11:19 PM

If you are not the owner, and do not belong to a group that can write, you can't write to it at all.

Try to edit your /etc/fstab file (as root) and make the line referring to the floppy look like this:

/dev/fd0 /mnt/floppy auto noauto,users,rw,uid=501,gid=501,fmask=777,umask=0 0 0

witeshark 06-03-2004 11:23 PM

And please remember to not be on line as root while making changes ;)

jeffreybluml 06-04-2004 06:43 AM

Am I to understand this to mean that being online, while logged in as root, poses a security threat?

If this is true, is it even true if you're firewalled, but have ports open for http and ssh?

Please advise...

smokylux 06-04-2004 07:17 AM

In general, being logged as root can be very harmful to your system, as changes (or should I say mistakes) you make have much more consequences, as you have access to everything.

Doing a mistake as normal user won't have too much consequences on your system... so it is always good advice not to be logged in as root unless you have to.


smokylux

Tuttle 06-04-2004 07:35 AM

i would normally make changes like that when logged in as a normal user, I would open a terminal window, type "su", enter the password and make the nessecary changes. Type "man su" to see what this does. "man" will tell you alot about any command you wish to try - eg. "man chmod" or "man man" even!

jeffreybluml 06-04-2004 07:43 AM

Sorry, should have clarified...
I understand that you are your own worst enemy when logged in as root, and that you can totally mess up your system if you're not careful. I'm just curious to know whether or not it poses some kind of security threat pertaining to "hackers" and the such on the good 'ole internet, because of the above comment about not making changes, as root, while you're online.

I can't imagine linux would have such a security hole as to give outside access to your system when, and especially when, you're looged in as root. But, I just wanted to make sure...

Thanks,

Tuttle 06-04-2004 07:49 AM

It's more to do with being logged in as root rather than using the "su" command. You should never log in as root if you can help it - especially dont log in as root and then "startx"!

edit: you are always logged in as root in ms windows!

eeried 06-04-2004 08:03 AM

Quote:

... - especially don't log in as root and then "startx"!
What can happen then, apart from being able to destroy your files or the kernel etc? -- I mean even if you don't get connected to the internet.

Quote:

edit: you are always logged in as root in ms windows!
Quite so! Wonderful windoz, isn't it? :mad:

Cheers,

Tuttle 06-04-2004 08:08 AM

Not sure, I just know it opens lots of holes! The x server is very complicated, you'd have to ask someone who knows more about these things. Sorry I can't help anymore.

Tuttle 06-04-2004 08:22 AM

Quote:

Originally posted by eeried
-- I mean even if you don't get connected to the internet.

Sorry, didnt understand, I dont think it'll harm your system if you are NOT connected to the internet

kougar 06-04-2004 10:07 AM

Thanks, bruno buys
I'm still shaky on my feet so far, though.
Here's my current fstab contents:

/dev/hda5 / ext3 noatime 1 1
none /dev/pts devpts mode=0620 0 0
/dev/hdc /mnt/cdrom auto umask=0,user,iocharset=iso8859-1,codepage=850,noauto,ro,exec 0 0
none /mnt/floppy supermount dev=/dev/fd0,fs=ext2:vfat,--,umask=0,iocharset=iso8859-1,sync,codepage=850 0 0
/dev/hda1 /mnt/windows ntfs umask=0,nls=iso8859-1,ro 0 0
none /proc proc defaults 0 0
/dev/hda6 /swap vfat umask=0,iocharset=iso8859-1,codepage=850 0 0

The only line I see referencing the floppy is the fourth one, which looks nothing like the substitute you gave me. Is this the one I'm s'posed to replace, or should it be added in as a new line?
Thanks for your continued patience.

bruno buys 06-04-2004 11:12 AM

Hi kougar,

Yes, this is the line referring the floppy drive. It's a bit more complicated than a standard floppy fstab entry, cause it uses the supermount.. I guess those last parameters try to mount a floppy to use with a win floppy (codepage, etc...).

If you edit this line, and only this one, there will be no harm to your system. You can do it safely. Try to make a few experiments, and see whats the best behaviour you want to have from your system.
Do you know the "coment" practice? Comenting a line would disable it, just like in a GUI you un-tick a box to disable something. Coments are a way to insert human-guided text in scripts or code. The computers ignore those comented lines. Like this:

#! /bin/sh

comand-to-do-something -w -r -t etc...

# comand-to-do-something -w -r -t etc...

The above two lines are the same, except that the first is enabled and the second is disabled by the comment (#) mark.

So, all you have to do is insert a # mark before the line you wanna disabled (the original one in fstab) and insert the new line I gave you. Reboot and check it out.
To revert the system back to the original setup, just insert a # before the new line, and remove the coment of the original one. The parser will parse only uncomented lines.

If the new line makes the system bahave the way you like, that's it. You're done.

kougar 06-04-2004 11:43 AM

I program in a couple of languages, so I'm (very much) familiar with commenting. The supermount was throwing me off, and I didn't want to unwittingly do anything to my beautiful Linux installation now that I've finally gotten it up and sort of running.
Thanks for the help.


All times are GMT -5. The time now is 08:18 AM.