Jump to content

Sharing a hard drive[solved]


Electraglider
 Share

Recommended Posts

Hello all,

Thanks to AussieJohn I am now running 2005LE vice 10.1 and it is running smoothly. :thanks: However, I have a question...Up until now I have been using a spare computer running Win2k to back up data files from my main computer which is running Win2K. Now I am going to be using my new Linux box in the same capacity. Among other things. This computer has 2 hardrives, one of which was formatted when I installed Linux with three partitions. The other one is a 40 gig hard drive which I have mounted to /mnt/hdb1. I would like to share this drive across my home network so I can access it from my main Win2K computer and back up my files. It seems, however, that I can't share the drive unless it is in my home directory so I mounted it there but then I couldn't share it because of something to do with the fileshareset not being set suid root. I searched this board for everything I could pertaining to the issue but I could find nothing that quite fit the situation.

 

I did have the network set up such that I could see all of my shared drives on the win2K machine from the Linux box using smb: and Konqueror and I tried to backup the data files using the backup utility in the MCC. That worked but I couldn't get it to backup to the folder I had created for it. The backup file went into the parent directory of the folder I was trying to back up to. Moving the backup file to the folder I had created for it didn't work. sometime during the process of trying to get it all to work the way I wanted it to work I lost all the file sharing capability I had. I guess basically what I need to know is, how do I share a second hard drive so that it can be accesed across the network from other machines? If I mount it at /mnt/hdb1 I can't share it unless it is in my home directory. If I mount it in my home directory I can't share it because of some application permissions. I checked the permissions for fileshareset and it is user:root, group:root.

Edited by Electraglider
Link to comment
Share on other sites

Are you running 2005 or 2006 ?

 

the problem with the file shareset is a mandriva 2006 bug: have a look at

 

http://qa.mandriva.com/twiki/bin/view/Main...Linux2006Errata

 

> Perl setuid not working properly

> filesharing not working properly

 

you can still share your harddrive even if it's not in your home-directory, but it's a bit more complicated (not much indeed), since it seems that you have already samba installed, you could define /mnt/hdb1 as a public share (so everyone in the LAN can access it), this place is a bit short to explain filesharing with samba, my best advice at the moment is to read the samba documentation.

 

If you are running 2006, then you could install the drakwizard-base rpm, then you can setup a samba-server through the MCC (it really works ! :D )

Link to comment
Share on other sites

Thanks to AussieJohn I am now running 2005LE vice 10.1 and it is running smoothly.

lavaeolus... that's what Elect's using :P

 

If I mount it at /mnt/hdb1 I can't share it unless it is in my home directory. If I mount it in my home directory I can't share it because of some application permissions. I checked the permissions for fileshareset and it is user:root, group:root.

 

when mounting it at hdb1, try to create a folder on it and then give full ownership of that folder to the account you are using or your regular user account...

 

say as root:

#mkdir /mnt/hdb1/sharedfolder

and assuming your regular user is electraglider.. issue command

#chown electraglider.electraglider /mnt/hdb1/sharedfolder

 

that way, that folder will be owned by electraglider, so as with your smb.conf, the shared folder path should be /mnt/hdb1/sharedfolder and that will gave you full access on that folder..

 

 

Sharing hardrive I think, applies only when you dual-boot win2k and linux... on sharing it in your network, you are just sharing a folder

Edited by aioshin
Link to comment
Share on other sites

Thanks aioshin,

You seemed to have grasped exactly what I am attempting to do.

 

On your suggestion I changed ownership of the folder I had already set up on the /mnt/hdb1 directory but upon attempting to share it I was again informed I couldn't unless it was in my home directory. So I went ahead and edited my smb.conf file thusly:

[Electraglider Backup]

comment = Network backup

path = /mnt/hdb1/Electraglider

valid users = lyle

public = yes

writable = yes

printable = no

create mask = 0765

 

..and was immediately rewarded with viewing the folder "Electraglider" in my nethood on the win2k machine. However, and there is always one of those, :o upon attempting to acces that share folder I was presented with a login prompt for user name and password in which I entered my user name and password. That didn't work so I tried root user name and password and that didn't work either. So, I'm about 2/3's of the way there. Should I put down everyone or everybody or all users or something to that affect on the valid users line? I'm thinking that it may be due to the fact that I haven't actually shared the folder yet. Should I now mount the folder, (and how do I do that without mounting the whole hard drive?) in my home folder? :unsure:

 

Thanks also to lavaeolus for taking the time to read and reply to my post. If I upgrade to 2006 I'll keep the suggestions in mind. :thumbs:

Edited by Electraglider
Link to comment
Share on other sites

Addendum,

 

Okay, I have mounted hdb1 in my home folder using MCC, I can see it in my home folder and I can see all the folders and files contained within. Further, the folder I wish to access across my network has the regular user, that's me, with full ownership. When right clicking on the folder in my home directory that I have full ownership of I get the following error:

 

An error occurred while trying to share folder '/home/lyle/hdb1/Electraglider'. Make sure that the Perl script 'fileshareset' is set suid root.

 

I am using konqueror and when I start konq as root I get the " you can't share a folder that is not in your home directory" error... :cry:

 

So whad do I do now????

Link to comment
Share on other sites

..and was immediately rewarded with viewing the folder "Electraglider" in my nethood on the win2k machine. However, and there is always one of those, ohmy.gif upon attempting to acces that share folder I was presented with a login prompt for user name and password in which I entered my user name and password.

 

have you tried those users that you wish to have access from network to be added in your smbpasswd file...

 

#smbpasswd -a user1

 

That will let you add the user with username user1 on smbpasswd file ( just guessing you forgot to use it)

Link to comment
Share on other sites

Thanks aioshin,

 

...but I didn't forget. I just didn't know. So I tried it and it worked after a fashion.

 

Now the folder I had pointed to in the smb.confg file is in accessible but everything in my regular user home folder is accessable including the folder I had pointed to in the smb.confg file. Pretty interesting. Further, I wasn't even asked for a user name and passward. go figure.

Link to comment
Share on other sites

further, I wasn't even asked for a user name and passward

 

if the username and password you are using on your win2k is the same username and password you assign on your smbpasswd file (same linux user-account) that's what would happen.. it wont ask or prompt you any username and password..

 

 

ok, if you have'nt visit the samba page, there are lots of example that you can refer, detailed how-to... it might help you further..

 

http://us4.samba.org/samba/docs/man/Samba-Guide/

 

http://us4.samba.org/samba/docs/man/Samba-HOWTO-Collection/

Edited by aioshin
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...