Re: Accessing SuSE 9.0 files from 9.1
From: MWE: Mark (happier_at_without.spam)
Date: 10/29/04
- Next message: Hans Maertens: "Re: Is SuSE washed up in Europe"
- Previous message: Diego F.: "More about installing Apache2 in SuSE 9.1 Personal"
- In reply to: Paul: "Re: Accessing SuSE 9.0 files from 9.1"
- Next in thread: MWE: Mark: "Re: Accessing SuSE 9.0 files from 9.1"
- Reply: MWE: Mark: "Re: Accessing SuSE 9.0 files from 9.1"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 29 Oct 2004 11:32:07 +0100
>>> I have SuSE 9.0, 9.1 and Windows 98 installed on my notebook, and
>>> boot into 9.1.
>>>
>>> Filesystem 1K-blocks Used Available Use% Mounted on
>>> /dev/hda5 4883556 2274900 2608656 47% /
>>> tmpfs 95736 16 95720 1% /dev/shm
>>> /dev/hda1 9757936 181328 9576608 2% /windows/C
>>> /dev/hda4 14265280 4753904 9511376 34% /data1
>>>
>>> SuSE 9.1 allows me easy access to Windows but to exchange files with
>>> 9.0 I have to go to super user, mount /data1, exchange the files, and
>>> use chown on them. I use 9.0 for development, but prefer 9.1 for
>>> personal tasks.
>>>
>>> Is there any way I can get easy access to the 9.0 partition from 9.1
>>> as a user?
>> Hi Paul,
>> I can think of two separate issues that you might be encountering.
>> The first, and most likely, is that perhaps you need to modify the
>> 9.1 /etc/fstab file. Please can you post a copy of the /etc/fstab
>> file as a reply to this message. Alternatively, if you want to try to
>> solve this yourself, the mount command has a very long man page you
>> can access with:
>> man mount
>>
>> The other issue I can think of concerns UID and GID numbers. (User
>> IDs and GIDs). Every user you create is allocated a UID number. The
>> ownership of the files is determined by the number, not by the name.
>> This is easier for me to explain with an example: Imagine that when
>> you installed SuSE 9.0 you had created a couple of users called "bill"
>> and "ben" and that "bill" had been allocated UID 500 and "ben"
>> allocated UID 501. Then imagine that when you installed 9.1 you only
>> created user "ben" and didn't create user "bill". In this case user
>> "ben" would likely be alloctated UID 500 (the first available
>> number). Now "ben's" UID doesn't match the UID stored with all the
>> files he created earlier -- they are stored with UID 501 but now, on
>> the SuSE 9.1 installation, "ben" has UID 500. In this case "ben" can
>> no longer access any of his own files.
> Thanks, here's my fstab:
>
> /dev/hda5 / reiserfs acl,user_xattr
> 1 1
> /dev/hda4 /data1 auto noauto,user 0 0
> /dev/hda1 /windows/C vfat
> users,gid=users,umask=0002,iocharset=utf8 0 0
> /dev/hda3 swap swap pri=42 0 0
> devpts /dev/pts devpts mode=0620,gid=5
> 0 0
> proc /proc proc defaults 0 0
> usbfs /proc/bus/usb usbfs noauto 0 0
> sysfs /sys sysfs noauto 0 0
> /dev/cdrom /media/cdrom subfs
> fs=cdfss,ro,procuid,nosuid,nodev,exec,iocharset=utf8 0 0
> /dev/fd0 /media/floppy subfs
> fs=floppyfss,procuid,nodev,nosuid,sync 0 0
OK, so according to your /etc/fstab file your data1 partition will not be
mounted automatically when you boot. That is because of the "noauto"
parameter. The "user" parameter means that any user should be able to
mount the partition manually.
The first thing you might want to consider therefore is to replace
"noauto,user" with "defaults". That way it should be mounted
automatically when you boot, and users will be able to access files and
execute programs.
Be aware that changing the mount options for a partition does have
implications for functionality and security so it is good to understand
these. The "man" page for the mount command is reasonably thorough and I
would still encourage you to get familiar with it.
Now, the second matter was that you said you needed to chown the files
before you can use them.
Before we try and "solve" that problem, I suggest you verify that the
problem still exists after you have resolved the mount problem since I
couldn't be sure from your first post whether you have two different
problems or one problem with two symptoms.
If the ownership problem has gone away then you don't need to read the
rest of this post.
If the "chown" problem does still exist then you will need to find out
what UID & GID is stored with the files and see whether that matches the
UID & GID in your /etc/passwd files. You can see the UID & GID
information for files by using the "dir -n" to list them. You can see
your active UIDs and GIDs by looking in the files /etc/passwd and
/etc/group respectively.
As usual you can use command similar to the following to check the online
information and get greater understanding:
"dir --help | more"
"man dir"
"man 5 passwd"
"man 5 group"
Houghi responded with a correction to my first post (thanks Houghi) and
pointed out that in SuSE 9.1 UIDs begin at 1000 and in SuSE 9.0 they began
at 500. This doesn't negate the point I was making but, instead, makes
the problem I was describing easier to create by accident.
If you have accidentally created mismatch with UIDs then what you do about
it will depend on what you have already done. However, if you have
already "chowned" some of the user files then I would probably now choose
to "chown" all the remaining ones "en masse". Check out how to do this
with:
"man chown"
Then proceed with care, because clumsy use of chown will not leave you
with a complete disaster but you could end-up with an awful lot of tidying
up to do. I sugggest that you experiment in stages with a few
subdirectories to make sure you understand the chown options. Also, try
to avoid using chown as root unless you absolutely have to ...
One final hint for your consideration (sorry, I don't have time to
describe this in detail): If you really have lots of files and users to
deal with and there is lots of scope for error you could consider creating
a temporary user that has the same UID and GIDs as the files you are
trying to modify the ownership of. This temporary user will automatically
own all the files that have a matching UID & GID and can then chown them
to the correct user relatively safely because you won't need to run the
chown command as root.
Good luck & best wishes,
Mark
----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= East/West-Coast Server Farms - Total Privacy via Encryption =---
- Next message: Hans Maertens: "Re: Is SuSE washed up in Europe"
- Previous message: Diego F.: "More about installing Apache2 in SuSE 9.1 Personal"
- In reply to: Paul: "Re: Accessing SuSE 9.0 files from 9.1"
- Next in thread: MWE: Mark: "Re: Accessing SuSE 9.0 files from 9.1"
- Reply: MWE: Mark: "Re: Accessing SuSE 9.0 files from 9.1"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|