LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 08-08-2008, 02:13 PM   #1
bgruett
LQ Newbie
 
Registered: Jul 2007
Posts: 11

Rep: Reputation: 0
Problems Accessing Suse10.3 Shares From A Windows XP Pro SP3 Client


I've set up a Suse10.3 server here at work with the intent of using it to host an internal Intranet site. I've muddled my way through getting the OS installed and updated, and I've installed Apache, PHP, and MySQL. Finally (for those who know) I've installed the Joomla open-source web hosting application. I also set up a MySQL database for the Joomla software to utilize.

Considering this is my first real server OS install in the Linux world (I'm a nOOb), things were going amazingly well. All the horror stories were a lie!, I thought to myself.

But then, disaster! I wanted to make sure that I could access the 'infonet' folder on the Linux system containing my hosted web files from a remote Windows PC (/srv/www/htdocs/infonet/). That way I could upload new files, modify files, delete files, etc, without always logging into the Linux system directly, mounting a network volume, and pulling data it from there.

So I went to the folder in question, right-clicked, selected SHARING OPTIONS from the pop-up menu, clicked SHARE THIS FOLDER, clicked ALLOW OTHER PEOPLE TO WRITE IN THIS FOLDER, and clicked CREATE SHARE. But instead of getting a shiny new share, I get an error saying "'net usershare' returned error 255: net usershare: usershares are currently disabled".

Hmmm...so I tinkered with it for a while, tried sharing other folders in other locations, modifying permissions, etc, but nothing worked. Some people suggested modifying the SMB.CONF file (which I might consider if I had any idea where it was located, and since the Search service isn't working for some reason I can't search for it). Even then, I would hope that this could be solved 100% in the GUI. Bash me if you want, but Linux or not I've always felt that command prompts are for the old DOS days and don't belong in the here and now (yes yes, I know, the hate posts will no doubt start rolling in).

So I thought that I'd get Samba up and running as an alternative (nevermind that the difference between Samba and the integrated sharing function isn't clear to me). So I install Samba, set up a share using Samba, and find that in spite of the Samba settings the folder itself remains unshared in the explorer view. So I'm wondering "Is it shared? Is it not?" No idea.

Then I looked at FTP as an alternative, but I can't find anything on FTP built into Apache (don't know if it exists, but Apache created an FTP folder so I'm assuming it must). I also downloaded a copy of ProFTP but since apparently I'm missing a C Compiler I can't install it.

So bottom line here: all I'm trying to do is share out the folder /srv/www/htdocs/infonet/, which is where my web files are being hosted, so that I can access and modify these files from a remote Windows PC. That's it. If it can be done 100% through the GUI then all the better. If not, that's fine, as long as I understand what it is I'm doing.

Oh, and one last thing: please fight the urge to demand to know why I set things up the way I did, ridicule my opinion of the command line, or in general criticize my knowledge of Linux. There is a reason behind everything I've set up and I'm looking for straightforward answers, not a firing squad. Sorry to put this in here, but some of the comments that make it into Linux forums in general can get pretty nasty. I'm looking for a solution.
 
Old 08-08-2008, 03:08 PM   #2
garyg007
Member
 
Registered: Aug 2008
Location: north-east ohio
Distribution: Debian-squeeze/stable;
Posts: 279
Blog Entries: 1

Rep: Reputation: 31
I wont pretend to understand all of what you wrote ---- but , considering the forum this is in, the first thing that came to my mind was file-types. Are you trying to take files on the linux system and share them with windows systems? If so what are the file types of the files on the linux system?

Also, you do need SAMBA if you are going to share files between windows and linux.
 
Old 08-08-2008, 03:19 PM   #3
bgruett
LQ Newbie
 
Registered: Jul 2007
Posts: 11

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by garyg007 View Post
I wont pretend to understand all of what you wrote ---- but , considering the forum this is in, the first thing that came to my mind was file-types. Are you trying to take files on the linux system and share them with windows systems? If so what are the file types of the files on the linux system?

Also, you do need SAMBA if you are going to share files between windows and linux.
Thanks for the reply. And thanks for confirming what I had suspected about Samba. Wasn't sure if it was required or optional in terms of my requirements.

Regarding the file types, there are a bunch, but they're all common to web hosting. Some worth noting are PHP, HTML, XML, CSS, PNG, JPG, GIF, INI, ICO, TXT, and others. Most are PHP, but that's just because the Joomla application is full of them.

In the simplest sense, however, the website could just as easily be a single HTML file and nothing else. I would be surprised if the contents of the folder I'm trying to share would determine my ability to share it. I'd imagine I could share it if it were completely empty.

Thanks,
Bob
 
Old 08-08-2008, 03:36 PM   #4
garyg007
Member
 
Registered: Aug 2008
Location: north-east ohio
Distribution: Debian-squeeze/stable;
Posts: 279
Blog Entries: 1

Rep: Reputation: 31
Sorry, my bad question. What I was looking for was
ext2 or ext3, fat, vfat, ntfs ---- like that. The linux files you want to share with windows must be vfat, fat or ntsf.
Sometimes my memory fails me and I get the wrong terminology.
 
Old 08-08-2008, 04:01 PM   #5
bgruett
LQ Newbie
 
Registered: Jul 2007
Posts: 11

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by garyg007 View Post
Sorry, my bad question. What I was looking for was
ext2 or ext3, fat, vfat, ntfs ---- like that. The linux files you want to share with windows must be vfat, fat or ntsf.
Sometimes my memory fails me and I get the wrong terminology.
Hmmm...I wonder if you didn't hit on something there...

The file system is EXT3. Assuming there's no easy way to convert the WHOLE thing to a Windows-accessible format, then my only option, it seems, would be to either throw an external drive onto this PC for sharing or add a second drive internally. Either way, I'd have to move my web destination to the new location.

Thanks,
-Bob
 
Old 08-08-2008, 05:38 PM   #6
garyg007
Member
 
Registered: Aug 2008
Location: north-east ohio
Distribution: Debian-squeeze/stable;
Posts: 279
Blog Entries: 1

Rep: Reputation: 31
You can share a vfat or ntfs partition between windows and linux. Linux understands windows file systems where as windows does not understand linux file systems. Allocate and format a vfat or ntfs partition on your linux system and then copy the files from the ext3 file system to the vfat or ntfs.

If you chose ntfs do a little research because there are drivers for ntfs that you may have to install to support ntfs.

The trouble with vfat is its max file size is less than ntfs; Im not sure about max sizes between ext3 and ntfs.
 
Old 08-08-2008, 05:53 PM   #7
bgruett
LQ Newbie
 
Registered: Jul 2007
Posts: 11

Original Poster
Rep: Reputation: 0
Hmmm...no luck.

I threw an external drive onto the Linux machine, copied all my web folders/files onto it, modified Apache to point to the new location, verified that the webserver was still serving up pages, and then tried to share out of the folders. Same problem as before. Samba doesn't seem to have a problem with setting up the share, but I can't reach it from Windows.

Oh, the file system of the new drive is NTFS.

I'll keep playing with it and post back...
 
Old 08-08-2008, 07:36 PM   #8
bgruett
LQ Newbie
 
Registered: Jul 2007
Posts: 11

Original Poster
Rep: Reputation: 0
This evening I played around reformatting/repartitioning the drive. It started out as NTFS (it's existing state when I attached it). As NTFS I was unable to connect to it remotely from Windows (no error...just repeated requests from the Linux system for a username and password).

Later I reformatted the drive as VFAT. As before, I used Samba to create a share for one of the folders I copied over to the drive, and as before, no errors when I set up the share. Unfortunately, I am still unable to map a network drive connection to the share from my Windows system. Just as before, I'm not getting an error when I try to map the drive, I'm merely getting prompted for credentials repeatedly.

Argh...I'm not sure what I'm doing wrong. I can't believe it's really this hard to share a folder in Suse, so I must be missing something...

-Bob
 
Old 08-08-2008, 07:49 PM   #9
garyg007
Member
 
Registered: Aug 2008
Location: north-east ohio
Distribution: Debian-squeeze/stable;
Posts: 279
Blog Entries: 1

Rep: Reputation: 31
Take a look at this; it is an SMB howto

SMB is not one of the easier things I have used. I have to relearn it every time I need to get into it.

Google search I used was "samba shares" (without the quotes)

Also take a look at Swerdna's suse tutorials. He has quite a bit about samba

Last edited by garyg007; 08-08-2008 at 07:58 PM.
 
Old 08-09-2008, 07:57 PM   #10
bgruett
LQ Newbie
 
Registered: Jul 2007
Posts: 11

Original Poster
Rep: Reputation: 0
Thanks for the links. I'll take a look and let you know.

-Bob
 
Old 08-10-2008, 05:00 PM   #11
bgruett
LQ Newbie
 
Registered: Jul 2007
Posts: 11

Original Poster
Rep: Reputation: 0
GaryG007, you are a gentleman and a scholar.

The Swerdna's tutorial "Samba: Practical Introduction to Linux Usershares on openSUSE 10.2, 10.3" was just what I needed. Using this tutorial I was able to add several entriest to the SMB.CONF file and modify the permissions on the /var/lib/samba/usershares. After that was done I was able to right-click the folder I wanted to share and enable sharing without any problems at all.

A few noteworthy details, for those who care:

- For whatever magical reason, I don't have to supply either a username or password from Windows when I access the share remotely. I'm sure my security is all screwed up (which I don't care about for the purposes of this project) but it's weird that previous to my modification of the SMB.CONF file I was prompted incessantly and now I'm not being prompted at all. Still, the lesser of two evils since I can access my Linux data remotely.

- For another reason, no doubt as magical as the first, I am able to share folders on both EXT3 and VFAT volumes. Again, after I modified the SMB.CONF file I can create shares in both locations without any problems, and without any perceived differences between the two.

- Finally, as thrilled as I am that this is working now, Samba is still confusing to me. On one hand a brand new share folder appeared in the /var/lib/samba/usershares folder after I shared my folder, but on the other I still don't see an entry in the Samba GUI interface within YAST to indicate the presence of a new share. Doesn't really make sense to me why there'd be a GUI app if it doesn't reflect the actual 'share state', so to speak.

So that's it folks. Things are working. I couldn't be happier, and life is good.

Thanks so much for your help, Gary. Very good info.

-Bob
 
Old 08-10-2008, 05:25 PM   #12
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Quote:
Originally Posted by garyg007 View Post
Sorry, my bad question. What I was looking for was
ext2 or ext3, fat, vfat, ntfs ---- like that. The linux files you want to share with windows must be vfat, fat or ntsf.
Sometimes my memory fails me and I get the wrong terminology.
a

No, these are filesystems, and it doesn't need to be ntfs or vfat to share with windows computers and shouldn't be because they don't contain linux acls and permissions.

Is Samba installed? Could you post the Global and the part of smb.conf that deals with the share?

Run "kdesu /sbin/yast2 firewall" and make sure that these ports are open:
Code:
139/tcp  open  netbios-ssn
445/tcp  open  microsoft-ds
Check the permissions of this share. I'm wondering if doing this could cause a problem with apache, which may be trying to restrict access. You want to have access wide open. Allowing global write access as you are planning could make you Linux system open for abuse and visible for malware. I just thought I would mention this in case you want to drop the entire idea.

What does the "security =" line say. If it says "Security = User", then you need to create a linux user matching each windows user and use "smbpasswd" to add these usernames and passwords into samba's smbpasswd file. There are other password backends and if you have more than 20 users, you may need or want to use a different method.

Alternatively, when using "Security = User", if you have a share that allows Guest access, then reading/writing without authentication would be possible. This seems to be what you are trying to do. Non-authenticated users are aliased to "Guest" user in Windows and the files are created owned by Linux's "nobody" user.

For this, you need the line "map to guest = Bad User" in the Global section of smb.conf.

In the share definition itself you need
guest ok = yes
read only = no

Now, if you are an authenticated user, files you create will be created owned by you. If you are a non-authenticated user, then you are aliased to the window user "Guest" and the "Guest OK = yes" allows you to create files.

One other part of the equation is to allow "others" write access to the directory being shared. To also prevent one user from deleting the files owned by another user, you want to also set the "sticky" bit on the directory. So use:
sudo chmod a=rwx /srv/www/htdocs/infonet
or to also check the sticky bit:
sudo chmod a=rwxt /srv/www/htdocs/infonet

Hope this helps.

p.s. It took too long for me to post this, and when I started there were only two posts.

Last edited by jschiwal; 08-10-2008 at 05:26 PM.
 
  


Reply



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
Connect Linux to internett trough Windows XP PRO SP3 shadyboy Mandriva 5 11-28-2006 08:51 AM
Accessing Windows shares in a domain humbletech99 Linux - Networking 6 03-29-2006 01:02 AM
Accessing Windows Shares careyd Linux - Networking 3 12-01-2005 03:18 PM
Accessing Shares from windows z9_87 Linux - Networking 1 02-07-2005 07:35 PM
Accessing Windows Shares haroldopaulino Linux - Networking 1 08-17-2004 11:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:16 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
Open Source Consulting | Domain Registration