LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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-07-2003, 07:29 AM   #1
Foggy
LQ Newbie
 
Registered: Dec 2003
Location: Reading England
Distribution: RedHat 9.0 Enterprise.
Posts: 14

Rep: Reputation: 0
Share Windows Folders


Hi All,

I have a dual boot system. (Single Disk)

Windows XP is on the C: Drive and I have partitioned part of this drive to run Linux.

In the windows part of the drive I have a folder with all my MP3's in it and I would like to be able to access this folder to listen to my music when I am using Linux.

Thanks for any help.


Best wishes.


James.
 
Old 12-07-2003, 08:43 AM   #2
pandasonic
Member
 
Registered: Nov 2003
Location: Bronx, NY
Distribution: Fedora Core 3
Posts: 53

Rep: Reputation: 15
Hey Foggy,

First, find out what filesystem your C: Drive has been formatted in.

IF it is a NTFS partition (Linux can't recognize NTFS which is what WinXP is most likely running on, but it can recognize FAT32) then you should created another partition in FAT32 and then mount it on Linux.

I recommend using something like PartitionMagic to create the other partition.

Once you have a FAT32 partition, go to a command prompt in Linux and do this:

# mkdir /mnt/<whatever you wanna call your new partition>
# mount -t vfat /dev/hdax /mnt/<whatever the partition is called>

-you don't actually have to type the <>
-the x in hdax stands for whatever number that partition is

then you may wanna edit the file /etc/fstab so Linux could automatically mount the partition on startup. what you'd have to do is simply add the following line to that file:

/dev/hdax /mnt/<name> vfat auto,umask=0 0 0

hope that helps :-)
 
Old 12-07-2003, 09:22 AM   #3
twilli227
Member
 
Registered: May 2003
Location: S.W. Ohio
Distribution: Ubuntu, OS X
Posts: 760

Rep: Reputation: 30
quote:
IF it is a NTFS partition (Linux can't recognize NTFS which is what WinXP is most likely running on,

Well, that is not true. Check out these sites for RedHats support of NTFS:
http://linux-ntfs.sourceforge.net/
http://www.linuxexperience.com/tutorials/redhatntfs.php

Last edited by twilli227; 12-07-2003 at 09:25 AM.
 
Old 12-07-2003, 09:32 AM   #4
ac1980
Member
 
Registered: Aug 2003
Location: Trento, Italy
Distribution: Debian testing
Posts: 394

Rep: Reputation: 30
Actually I think recent kernels can read ntfs quite well (writing is still experimental). You'll only need a vfat fs to transfer data from linux to winxp (but why would you use winxp any more? )
First check this:
mount
You may find your xp disk is already mounted
If not, type this a root :
mkdir /mnt/winxp
mount -r -t ntfs /dev/hda1 /mnt/winxp
ls /mnt/winxp

TIP: make use of shell auto-completion, try for example /m<tab>w<tab>

if it works put this in /etc/fstab:
/dev/hda1 /mnt/winxp ntfs ro,auto,umask=0 0 0


PS: i would suggest a
ln -s /mnt/winxp/<your mp3 directory> /home/<username>/mp3

Last edited by ac1980; 12-07-2003 at 09:34 AM.
 
Old 12-07-2003, 10:25 AM   #5
Foggy
LQ Newbie
 
Registered: Dec 2003
Location: Reading England
Distribution: RedHat 9.0 Enterprise.
Posts: 14

Original Poster
Rep: Reputation: 0
Hi PandaSonic,

Many Thanks for your help. My Windows drive is FAT32

Your instructions helped a lot.

A couple of questions:

I have mounted the whole of the C: drive and possibly that is overkill

How do I just mount the folder within c: Example c:/music mp3

I did the mounting within root but I can see that user james does not have permissions, how do I allow others permissions.

Best wishes.


James
 
Old 12-07-2003, 11:12 AM   #6
ac1980
Member
 
Registered: Aug 2003
Location: Trento, Italy
Distribution: Debian testing
Posts: 394

Rep: Reputation: 30
you can't mount a directory, you always mount a whole filesystem. If you don't actually use a directory, it will never be read, so don't worry about memory.
What you can do is symlinking: ln -s <file> <linkname>

>I did the mounting within root but I can see that user james does not have permissions, how do I allow others permissions.

did you mean you mounted under /root ? if so, don't do it! mount under /mnt/win
if you mean as root user, use mount -o umask=0 ...
 
Old 12-07-2003, 11:39 AM   #7
Foggy
LQ Newbie
 
Registered: Dec 2003
Location: Reading England
Distribution: RedHat 9.0 Enterprise.
Posts: 14

Original Poster
Rep: Reputation: 0
Hi ac1980,

You've worried me know:

This is what I did

[root@localhost james]# mkdir /mnt/c:
[root@localhost james]# mount -t vfat /dev/hda1 /mnt/c:
[root@localhost james]#

If I did wrong, What can I do about it.

Please try and be specific.

Best wishes.


James.
 
Old 12-07-2003, 11:54 AM   #8
ac1980
Member
 
Registered: Aug 2003
Location: Trento, Italy
Distribution: Debian testing
Posts: 394

Rep: Reputation: 30
try
mount -o umask=0 -t vfat /dev/hda1 /mnt/c
i'm going out now, i'll check for msg tomorrow

good luck
Alessandro

ps: remember, to have it mounted at boot time put this in /etc/fstab:
/dev/hda1 /mnt/c vfat auto,umask=0 0 0


Last edited by ac1980; 12-07-2003 at 11:57 AM.
 
Old 12-07-2003, 02:02 PM   #9
Foggy
LQ Newbie
 
Registered: Dec 2003
Location: Reading England
Distribution: RedHat 9.0 Enterprise.
Posts: 14

Original Poster
Rep: Reputation: 0
I Have tried as you have suggested, could you explain what the -o unmask=0 means.

However, I am still unable to get permission as a "user" to write to the folder/device or any of the subfolders.

I can read (that was the main purpose - so I could play my MP3's whilst using Linux). But I would also like to rip MP3's whilst I am using Linux and put them in the same place.


Best wishes.


James
 
Old 12-07-2003, 06:01 PM   #10
ac1980
Member
 
Registered: Aug 2003
Location: Trento, Italy
Distribution: Debian testing
Posts: 394

Rep: Reputation: 30
1) It's strange you can't write. Please send me the output of these commands, so i can further help you:
mount
ls -l /mnt/c

2) FAT filesystem doesn't have the concept of 'owner' or 'permissions', so you must specify what users can/cannot do (to learn more about permissions, use
'man chmod')

This is the relevant part of mount manpage ('man mount')

umask=value
Set the umask (the bitmask of the permissions that are not
present). The default is the umask of the current process. The
value is given in octal.

3) Probably what makes free software great is good to excellent documentation. if you feel courious/have a question about a command, the first thing to try is 'man commadname'. Pressing 'h' while in man pages takes you to viewer help. Take a minute to read the 'searching' section, it's worth it.
HOMEWORK: find the info on umask in muont man page with '/' and 'n' commands

Goodnite
 
Old 12-07-2003, 07:51 PM   #11
Foggy
LQ Newbie
 
Registered: Dec 2003
Location: Reading England
Distribution: RedHat 9.0 Enterprise.
Posts: 14

Original Poster
Rep: Reputation: 0
Arrow

Hi,

Thanks once again for your patience.

I did my Homework, still not that really sure about umask.

Please find below:

[root@localhost james]# mount -o umask=0 -t vfat /dev/hda1 /mnt/win
[root@localhost james]# ls -l /mnt/win
total 829872
-rwxrwxrwx 1 root root 235683 Feb 3 2002 2002-02Rorepes MOQ2.txt
-rwxrwxrwx 1 root root 298 Dec 3 2002 about
drwxrwxrwx 2 root root 16384 Dec 3 2002 acm
drwxrwxrwx 3 root root 16384 Jul 22 2002 adobeapp
-r-xr-xr-x 1 root root 554 Jun 30 2001 asd.log
drwxrwxrwx 3 root root 16384 Jul 15 2002 ati
drwxrwxrwx 3 root root 16384 Nov 30 22:01 audio
-rwxrwxrwx 1 root root 194 Jun 29 2001 autoexec.bak
-rwxrwxrwx 1 root root 139 May 27 2002 autoexec.bat
-rwxrwxrwx 1 root root 139 May 27 2002 autoexec.cam
-rwxrwxrwx 1 root root 194 Jun 17 2001 autoexec.dos
-rwxrwxrwx 1 root root 0 Nov 28 18:17 Autosafeactive.tmp
-rwxrwxrwx 1 root root 11711 Mar 15 2003 avgun.log
-rwxrwxrwx 1 root root 37658134 Feb 20 2002 back_up.reg
-rwxrwxrwx 1 root root 137 Jul 11 19:51 BcBtRmv.log
-rwxrwxrwx 1 root root 2031 Jul 1 2001 blank.html
-rwxrwxrwx 1 root root 194 Dec 30 2002 boot.bak
-r-xr-xr-x 1 root root 265 Dec 6 13:23 boot.ini
-rwxrwxrwx 1 root root 512 Oct 28 2001 bootsect.dos
drwxrwxrwx 2 root root 16384 Oct 6 2002 btmagic.pq
-rwxrwxrwx 1 root root 484864 Oct 1 2001 Capture001.avi
-rwxrwxrwx 1 root root 484864 Oct 1 2001 Capture002.avi
-rwxrwxrwx 1 root root 484864 Oct 1 2001 Capture003.avi
-rwxrwxrwx 1 root root 510976 Oct 1 2001 Capture004.avi
-rwxrwxrwx 1 root root 510976 Oct 1 2001 Capture005.avi
-rwxrwxrwx 1 root root 510976 Oct 1 2001 Capture006.avi
-rwxrwxrwx 1 root root 484864 Oct 1 2001 Capture.avi
-rwxrwxrwx 1 root root 64 Oct 1 2001 Capture.fcb
dr-xr-xr-x 4 root root 16384 Jul 15 01:17 cmdcons
-r-xr-xr-x 1 root root 237728 Aug 23 2001 cmldr
-rwxrwxrwx 1 root root 486 Jun 23 2001 compatid.txt
-rwxrwxrwx 1 root root 0 Jun 29 2001 config.bak
-rwxrwxrwx 1 root root 0 Jun 17 2001 config.sys
-rwxrwxrwx 1 root root 25292 Nov 29 2000 copying
drwxrwxrwx 2 root root 16384 Nov 29 18:59 Dido
drwxrwxrwx 7 root root 16384 Oct 28 2001 Documents and Settings
drwxrwxrwx 2 root root 16384 Oct 16 2002 download
drwxrwxrwx 2 root root 16384 Nov 29 23:52 Elton John
-rwxrwxrwx 1 root root 30 Mar 8 2000 file_id.diz
drwxrwxrwx 2 root root 16384 Nov 22 2002 found.000
drwxrwxrwx 2 root root 16384 Nov 28 2002 found.001
drwxrwxrwx 2 root root 16384 Dec 25 2002 found.002
drwxrwxrwx 2 root root 16384 Apr 2 2003 found.003
drwxrwxrwx 2 root root 16384 Jul 11 19:00 found.004
drwxrwxrwx 2 root root 16384 Jul 11 19:07 found.005
drwxrwxrwx 2 root root 16384 Jul 11 19:20 found.006
drwxrwxrwx 2 root root 16384 Aug 1 21:53 found.007
-rwxrwxrwx 1 root root 1012 Jun 17 2001 frunlog.txt
-rwxrwxrwx 1 root root 82 Nov 30 22:01 gcal.ini
drwxrwxrwx 2 root root 16384 Dec 3 2002 html
drwxrwxrwx 3 root root 16384 Oct 4 2002 HW Monitor
drwxrwxrwx 3 root root 16384 Sep 10 2001 imsi
-rwxrwxrwx 1 root root 1149 Nov 29 18:27 install.log
-r-xr-xr-x 1 root root 222390 Apr 23 1999 io.sys
-rwxrwxrwx 1 root root 172032 Dec 3 2002 lame_enc.dll
-rwxrwxrwx 1 root root 196608 Dec 3 2002 lame.exe
-rwxrwxrwx 1 root root 707 Dec 19 2000 license
drwxrwxrwx 2 root root 16384 Mar 31 2002 lj631en
drwxrwxrwx 3 root root 16384 Jun 17 2001 Media
drwxrwxrwx 2 root root 16384 Dec 3 2002 misc
-rwxrwxrwx 1 root root 834 Sep 5 00:54 Mp3FE.m3u
-r-xr-xr-x 1 root root 1678 Jun 23 2001 msdos.bak
-r-xr-xr-x 1 root root 1676 Jun 17 2001 msdos.sys
-rwxrwxrwx 1 root root 32 Sep 14 1999 msdsv.syc
dr-xr-xr-x 3 root root 32768 Oct 26 15:14 Music mp3
drwxrwxrwx 2 root root 32768 Mar 31 2002 My Download Files
drwxrwxrwx 3 root root 16384 Mar 23 2003 My Drivers
drwxrwxrwx 2 root root 16384 Jun 17 2001 My PixAround
-r-xr-xr-x 1 root root 45124 Aug 23 2001 ntdetect.com
-r-xr-xr-x 1 root root 222368 Aug 23 2001 ntldr
-rwxrwxrwx 1 root root 52507 Mar 15 2003 OfcDebug.log
drwxrwxrwx 14 root root 16384 Mar 15 2003 OfficeScan NT
drwxrwxrwx 3 root root 16384 Sep 26 22:04 OmegaOne
-rwxrwxrwx 1 root root 805306368 Dec 7 15:30 pagefile.sys
-rwxrwxrwx 1 root root 2959 Jan 25 2003 PCcheck.LOG
-rwxrwxrwx 1 root root 13030 Jan 10 2002 pdoxusrs.net
drwxrwxrwx 8 root root 16384 Aug 9 17:21 Perl
drwxrwxrwx 2 root root 16384 Aug 14 21:34 Playlist
dr-xr-xr-x 157 root root 16384 Feb 11 2002 Program Files
drwxrwxrwx 2 root root 16384 Nov 18 2002 PTabSetup
drwxrwxrwx 2 root root 16384 Aug 14 21:35 Radio Stations
-rwxrwxrwx 1 root root 1801 Jan 19 2002 readme
drwxrwxrwx 6 root root 16384 Oct 28 2001 Recycled
-rwxrwxrwx 1 root root 2308 Oct 5 2001 scandisk.log
drwxrwxrwx 2 root root 16384 Aug 1 2001 scremove
drwxrwxrwx 3 root root 16384 Oct 20 2001 Supra
-rwxrwxrwx 1 root root 111 Jul 24 2001 sys18315.bin
-rwxrwxrwx 1 root root 111 Jul 13 2002 sys43786.bin
drwxrwxrwx 4 root root 16384 Oct 28 2001 System Volume Information
drwxrwxrwx 3 root root 16384 Nov 25 2001 temp
-rwxrwxrwx 1 root root 14952 Oct 18 00:35 test.txt
drwxrwxrwx 2 root root 16384 Sep 29 20:23 Training
drwxrwxrwx 2 root root 16384 Oct 28 2001 undo
-rwxrwxrwx 1 root root 162304 May 24 2001 unwise.exe
drwxrwxrwx 57 root root 16384 Jun 21 2001 unzipped
-rwxrwxrwx 1 root root 25632 Jan 22 2002 usage
drwxrwxrwx 2 root root 16384 Jun 17 2001 VIAhm
drwxrwxrwx 2 root root 16384 Aug 25 2001 Video
-rwxrwxrwx 1 root root 49152 Jun 17 2001 videorom.bin
-rwxrwxrwx 1 root root 13 Jul 1 2001 vxsystem.dat
drwxrwxrwx 2 root root 16384 Jun 9 2002 Webdnews
drwxrwxrwx 3 root root 16384 Sep 5 2001 which
drwxrwxrwx 136 root root 65536 Jun 17 2001 windows
-rwxrwxrwx 1 root root 65536 Dec 19 2002 WINDOWSCAPTURE.AVI
drwxrwxrwx 6 root root 16384 Dec 1 2002 Windows CE Tools
-rwxrwxrwx 1 root root 63 Oct 1 2001 WINDOWSWinHlp32.BMK
-r-xr-xr-x 1 root root 10122 Oct 28 2001 winlfn.ini
-rwxrwxrwx 1 root root 10079 Oct 26 14:15 winzip.log
drwxrwxrwx 2 root root 16384 Oct 28 2001 WUTemp
-rwxrwxrwx 1 root root 2005 Nov 15 2002 ZinioInstall.txt
[root@localhost james]#

For information the directory I would like write permission is "Music mp3"

I notice that in RH7 there was a program called linuxconf that looked as if it would help me configure the permissions but it does not appear to be available in RH9

Best wishes


James.
 
Old 12-07-2003, 08:11 PM   #12
ac1980
Member
 
Registered: Aug 2003
Location: Trento, Italy
Distribution: Debian testing
Posts: 394

Rep: Reputation: 30
Still awake
Ok, got the problem: that dir has the readonly bit set (from win, i suppose)

as root, type:
chmod +w /mnt/win/Music\ mp3

tip: get used to shell auto-completion: /m<tab>w<tab>Mu<tab>
note: it's not common for unix files to include spaces, it may confuse badly-written shell scripts. Consider replacing the space with an underscore
(unix command for renaming is mv (for move))
 
Old 12-07-2003, 08:33 PM   #13
Foggy
LQ Newbie
 
Registered: Dec 2003
Location: Reading England
Distribution: RedHat 9.0 Enterprise.
Posts: 14

Original Poster
Rep: Reputation: 0
Hi Alessandro,

Not fixed yet:

[james@localhost james]$ su
Password:
[root@localhost james]# chmod +w /mnt/win/Music\ mp3
chmod: changing permissions of `/mnt/win/Music mp3' (requested: 0755, actual: 0777): Operation not permitted
[root@localhost james]#

I did try chmod 666 as well on /mnt/win but got a similar response.

Not sure what you mean by Autocomplete?

Now I'm going to bed.

Best wishes

James.
 
Old 12-08-2003, 04:57 AM   #14
ac1980
Member
 
Registered: Aug 2003
Location: Trento, Italy
Distribution: Debian testing
Posts: 394

Rep: Reputation: 30
Have you tryed again writing to the fs? 777 is exacly what you need!

the reason why you got the error message was actually your defaul umask (that a property of the shell, not of the filesystem) is probably 022, so chmod +w is interpreted as 'u+w'. To override explicitly type 'chmod a+w' or use numerical permissions like 777. Refer to chmod man page.

Last note: the executable flag for directories means stands for the ability to make it the current dir. A 666 permission (rw-rw-rw-), besides being unachevable on fat, makes little sense.

> Not sure what you mean by Autocomplete?
if you press <tab> your shell will complete the filename you're typing up to the first ambiguity. When there's no unique next char, it will beep. Pressing it again will list all the possible completions.
 
Old 12-08-2003, 06:30 AM   #15
Baldrick65
Member
 
Registered: Aug 2003
Location: Dunedin NZ
Distribution: Mint 13 Cinnamon
Posts: 653

Rep: Reputation: 31
Quote:
Originally posted by Foggy

[root@localhost james]# chmod +w /mnt/win/Music\ mp3
chmod: changing permissions of `/mnt/win/Music mp3' (requested: 0755, actual: 0777): Operation not permitted
[root@localhost james]#
This is really strange for a fat32 drive. Have you used any 3rd party encryption utils in windows that may be causing problems? You could also try creating another directory in Windows (or better still from Linux: mkdir /mnt/win/musicfiles as a normal user) and moving all your mp3's to there.

HTH Baldrick
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Can't share Linux folders--why not? watha Linux - Networking 1 10-21-2005 06:43 AM
accessing windows share folders jhonny Amigo 2 03-16-2005 03:03 PM
Share folders being disconnected yllchan Linux - General 0 11-09-2004 04:35 AM
Share folders hylke Linux - Newbie 8 10-22-2004 01:32 PM
Samba Share Folders chrisfirestar Linux - General 1 10-03-2003 04:23 AM


All times are GMT -5. The time now is 12:01 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration