Jump to content

Full access to windows and samba drives?


Guest lmorrison17
 Share

Recommended Posts

Guest lmorrison17

Here is my setup. 2 WD 80 gig drives. Drve hda has WinXP ntfs. hdb is dvd-rom. hdc is half fat 32 for saving files that i might want to read or write from anywhere this hdc1, the other half I used to instal MDK10.1 from downloaded dvd.iso. Mdk broke that up into 3 parts hdc5=root part. hdc6=swap part. hdc7= home part. hdd is a dvd-rw. I have 250 gig HD shared on a windows machine that I want to use for backup purposes. Here is what I want to be ble to do. I want to share hda1 so that i can access files on my xpdrive from other machines on my network, its ntfs and i already know i cant write to it and thats fine.I want to be able to share hdc1 so can read and write it accross the network. I want to be able to save files on the shared 250 gig drive on the network. Here is whaat i did. I created folders in my home dir. for each drive (hoping that would give me ownership) Then i mounted each drive in the folder that I had created for that drive. shared drive on network=/home/larry/bckupdrv this drive mounts when i boot and i can see everything in it but i cannot write anything in it. hdc1=/home/larry/storage i had access to and could write to this drive but could not share it UNTIL i created a system backup there then root took ownership. hda1=/home/larry/xpdrive i can access this drive and see everything but cannot share it.here is what my fsab lookslike.

 

 

/dev/hdc5 / ext3 defaults 1 1

/dev/hdc7 /home ext3 defaults 1 2

//cgs/Backup\040(F) /home/larry/bckupdrv smbfs user,credentials=/etc/samba/auth.cgs.larry 0 0

/dev/hdc1 /home/larry/storage vfat umask=0,iocharset=iso8859-1,codepage=850 0 0

/dev/hda1 /home/larry/xpdrive ntfs umask=0,nls=iso8859-1,ro 0 0

/dev/hdb /mnt/cdrom auto umask=0,user,iocharset=iso8859-1,codepage=850,noauto,ro,exec,users 0 0

/dev/hdd /mnt/cdrom2 auto umask=0,user,iocharset=iso8859-1,codepage=850,noauto,ro,exec,users 0 0

none /mnt/floppy supermount dev=/dev/fd0,fs=ext2:vfat,--,umask=0,iocharset=iso8859-1,sync,codepage=850 0 0

/dev/sda1 /mnt/removable auto umask=0,user,iocharset=iso8859-1,sync,kudzu,codepage=850,noauto,exec,users 0 0

none /proc proc defaults 0 0

/dev/hdc6 swap swap defaults 0 0

 

I have tried chown (I know 0 about commandline what i do know i got frome searches on here and other internet sites) I su'ed to root and typed "chown larry.larry /home/larry/bckupdrv"

it returns with an opperation not permitted error. I tired going into the system config app,security.permissions and changing what seemed to be what i need but when i reboot and check things root still has ownership. WHat do I need to do to get what I want?

 

EDIT I now have read write access to hdc1 i dont know how.

Edited by lmorrison17
Link to comment
Share on other sites

Ok. I would love to help and you gave great info, but I got a lot confused wth how you gave that info. Can you clarify some things?

 

What is this one? A samba share on another windows computer? Can you write to this one?

//cgs/Backup\040(F) /home/larry/bckupdrv smbfs user,credentials=/etc/samba/auth.cgs.larry 0 0

 

How about this one? Are you trying to share it from Windows to another PC with Linux (not the one you pulled this fstab from, I know). Can you write to this one normally? If not, add user in there, like my added bold:

/dev/hdc1 /home/larry/storage vfat umask=0,user,iocharset=iso8859-1,codepage=850 0 0

 

Same questions as above (except, of course you can't write to this one normally...but I've always been able to write to Windows shared drives through samba, even if they were ntfs):

/dev/hda1 /home/larry/xpdrive ntfs umask=0,nls=iso8859-1,ro 0 0

 

 

And, maybe you won't have to answer if ths is not set up in Windows. You did check the box in Windows that says "Allow other users to make changes to my files", huh?

Link to comment
Share on other sites

Guest lmorrison17
Ok. I would love to help and you gave great info, but I got a lot confused wth how you gave that info. Can you clarify some things?

 

What is this one? A samba share on another windows computer? Can you write to this one?

//cgs/Backup\040(F) /home/larry/bckupdrv smbfs user,credentials=/etc/samba/auth.cgs.larry 0 0

ANSWER) Is a samba share on a windows machine, on that machine for the share "Allow other users to make changes to my files" is checked. I can write to it from root only.

 

0How about this one? Are you trying to share it from Windows to another PC with Linux (not the one you pulled this fstab from, I know). Can you write to this one normally? If not, add user in there, like my added bold:

/dev/hdc1 /home/larry/storage vfat umask=0,user,iocharset=iso8859-1,codepage=850 0 0

ANSWER) Is a fat partition on the drive that linux is on.The reason for this is to save file that i want to access when I'm in windows or Linux. I want to share it from linux. When i originaly wrote the post I could not write to it but now i can.

it's fstab line now says.

/dev/hdc1 /home/larry/storage vfat umask=0,iocharset=iso8859-1,codepage=850 0 0

 

Same questions as above (except, of course you can't write to this one normally...but I've always been able to write to Windows shared drives through samba, even if they were ntfs):

/dev/hda1 /home/larry/xpdrive ntfs umask=0,nls=iso8859-1,ro 0 0

ANSWER) This one is not a samba drive, it's the first dive in the system, the one my windows is isnstalled on. I want to be able to share it over the network so I can access its files from another machine.

Link to comment
Share on other sites

How have you configured Samba? The key to sharing files between a Linux system and Windows is Samba. Perhaps more info on how your network is set up would be helpful. Common problems people have are setting their workgroup correctly and defining Samba shares. It doesn't matter if the Linux machine is sharing a Fat32 file or Reiser or Ext3 etc. Post your Samba config file (/etc/samba/smb.conf).

Link to comment
Share on other sites

Guest lmorrison17

Its not the samba config as i can do everthing i want to do if i log in as root.

The problem is ownership. You are only allowed to share stuff that you own and it has to be in your home direc. thats why i mounted everything in my home directory. Its just that even as root it wouldnt let me turn ownership over to my regular username. But it doesnt matter now anyway because i surrender. I have been crushed under the weight of MDK10 for over week now countless reinstalls of the os and software and plugins drivers nightmares up till the wee hours trying to make things work. Software and driver instaltion is rediculous. after a week i still cant get the printer or tv tuner to work.In XP Im actulay ALLOWED to do what i need to from one username. Stuff works, i can install what i want WHERE i want and is for the most part in sensable places. Say what you want about MS monster but there stuff just works. I had just as many reboots trying to change stuff in MDK. Xp is stable I go for weeks without rebooting or crashing. But I gave it my best shot but my hair went grey and then i pulled it out. SO i give and now i'll be able sleep at night at least. BTW thanks for trying.

Edited by lmorrison17
Link to comment
Share on other sites

  • 1 month later...
Guest jamepoule

Hello

I have the same problem.

The problem is that when a windows computer connects to your ntfs drive, the samba user is nobody (uid =99).

But your ntfs drive is mounted with uid=number of your personal user.

That's why the windows computer cannot access your ntfs drive. I don't know why it works with fat32 with uid=my personal user while my windows computer connects with nobody !

 

What I have done is setting uid=99 in fstab for my ntfs drive and it works, my windows computer can read this drive. But writing on ntfs is still forbiden because of the limitation of the ntfs module. I have to compile a new kernel and enable ntfs rw support, that is dangerous.

The big problem now is that I cannot access my files from linux because I am not logged with user nobody !

I am looking for how specify multiples uid in fstab.

 

Please don't give up, It will lean that microsoft won ...

 

good luck

Link to comment
Share on other sites

jamepoule hit the nail on the head. This little 'overlook' daunted me when i first started with Linu years ago and tooks me severals 'goes' at Linux (Red Hat at the time) and weeks to find out.

 

I would show an example line but i hardly use Samba in my house as all PC's are running some sort of Linux.

 

But you just need to add the options

uid=<your_username>,gid=<your_groupid>

 

This will mount the samba share with the uid and gid above as the owner and group respectivly.

 

You cant change the ownership of a samba mount as samba doesnt support native permissions like NFS does. Also you cant have multiple owners (or groups) on a file, jamepoule. You could look up umask option.

 

As for sharing a folder across samba, thats all all set up in /etc/samba/smb.conf and i havent seen one yet in this thread to comment.

 

lmorrison17

As for Windows 'working' i have yet to see a Linux machine brought to its knee's from viruses and parasties. For me Linux "just works" while Windows is a PITA!

Edited by DaveQB
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...