LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Setting permission, file access. (https://www.linuxquestions.org/questions/linux-newbie-8/setting-permission-file-access-334698/)

Apogeal1 06-17-2005 04:48 PM

Setting permission, file access.
 
At the suggestion of a family member, I am trying Linux, Xandros style. I have installed it on it's own 10G partition with Windows XP on the primary. The problem is, I won't be the only person using the computer and I have files on the C: drive that I want to restrict access to. Windows can't read the Linux partition, but Linux can read the Windows partition and all its files.

The problem is that I am unable to set permissions as the Admin (root) in Xandros file manager to restrict access to those C: files. Using the file manager, I am not able to set them to un-share, the settings of parameters as to what limits there are, who own it - root, group, etc., passwords, anonymous users, have no effect. Both root and regular use in Linux can see any C:/ file and access and change its contents.

Is that because Linux is not on the primary partition, installed first, installed alone? Of course, I'm asking here because no one has responded to my question in the Distribution forums. I guess it must be a really dumb question, but I hope someone will at least tell me that.

Also, I've gone throught the installation process again thinking I must have missed something in setup regarding permissions, but I don't see anything I could do differently.

Thanks

Tinkster 06-17-2005 05:27 PM

I'm not sure how Xandros handles its mount-options,
whether they're being dynamically created on boot
or not ...

But to fix the problem you'd need to change the
/etc/fstab
, more specifically you'll have to edit the line referring
to the windows partition, and make a umask of e.g.
077 and make the UID of the mount 0.


Cheers,
Tink

rkettle 06-19-2005 04:43 PM

not a dumb question at all..

you cannot set perms on an XP partition from linux... end of story.

The only way you can do it is if the Linux box is controlling the logons and it sounds like a home box to me.

The perms hold and you cannot change them via Linux... either use linux to control, or accept it.

Regards
Richard

chrism01 06-19-2005 09:15 PM

Because Windows and Linux don't have the same file attributes, the permissions idea does not translate identically.
To be honest, the easy way is to login to Linux as root, cd /etc, make a copy of the fstab file eg cp fstab fstab.orig, then edit the fstab file and remove the line(s) that mount the Windows partion(s).
Then either use umount (ie dismount cmd) to unmount the Windows partition, or reboot.
The Windows partition will not be mounted.
You can always (temporarily) mount it manually as root user if you want to.

Apogeal1 06-20-2005 11:46 AM

My thanks to Chris and to all who replied. I understand what I have to do to remove the Windows partitions. How will take some time. :newbie:

Thanks

chrism01 06-20-2005 08:17 PM

Actually, if you don't want to have to use the mount/umount cmds, there is another way.
You'll need 3 copies of the /etc/fstab file.

1. /etc/fstab - a copy of one of the following
2. /etc/fstab.xp - includes windows drive
3. /etc/fstab.none - does not include windows drive

/etc/fstab is the active one that Linux will look at. Decide whether you want XP drive avail or not, overwrite /etc/fstab with the relevant file (ie 2 or 3 above), using cp cmd, then try
mount -a
which will attempt to mount any drives in /etc/fstab not already mounted.
Try
cat /etc/mtab
to see if it's mounted.
Alternately, reboot to mount drives.
Obviously this has to be done as root user.

Repeat above as/when reqd.


All times are GMT -5. The time now is 06:30 PM.