LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 10-17-2003, 03:19 PM   #1
hildog
Member
 
Registered: Sep 2003
Location: New York, NY
Distribution: Red Hat 9
Posts: 33

Rep: Reputation: 15
networking dilemma


This may be more of a Windows networking question, but here goes:

I have a home network with 4 machines: 1 file server running Win2k, 1 Mac, 1 Desktop PC running Win2k, 1 dual-boot laptop (WinXP Pro & RH9). I have a cable modem service as my ISP - the cable modem is connected to the Router/WAP, and for the time being, until I get it all working, everything is wired (no wireless yet). I have the option of running the router as a DCHP server - which I have been doing successfully until I introduce Linux into the equation. The laptop is my workhorse and I'm trying to use Linux as much as possible (because I hate WIndows and Mac hardware is overpriced).

The first problem is that I can't find a way to access the file server from Linux unless I assign the server a static IP address...and when I assign the server a static IP address, the server loses the ability to connect to the internet - I assume it's because my ISP assigns IP addresses dynamically.

The second problem is that when the server has a static IP address and I can access it from Linux, it will only give me write access when I'm logged in as root...when I'm logged in as an ordinary user, I only have read access. On the server, I have all permissions wide open...anybody can do anything. And when I'm logged in as root, that's true.

So what I'm trying to achieve, in an ideal world, is to be able to access the file server with full rwx acess as a regular user in Linux, while simultaneously allowing the server to be able to connect to the internet. I don't know if there is a way for Linux to access the server when the router is being run as DCHP or not. If there is, I feel that this would probably solve my problem - my knowledge of networking in general is miniscule, so this may just be impossible. If so, I'd love to hear about any possible fix.
 
Old 10-17-2003, 03:44 PM   #2
nrunge
Member
 
Registered: Oct 2003
Distribution: Debian Woody (2.4.22)
Posts: 182

Rep: Reputation: 30
1.What OS is the file server running?
2. Servers should always have static IP's so that you can reliably connect to them and you dont have to worry about DHCP failure stopping such an event.
3. If your server is hooked up through a port on your router then the router, not any individual box get the public IP from the ISP and everything behind it will have private IP's. Your router does the transelation. I am assuming that the IP's your router gives out are 192.168.x.x (or at least with that few nodes it should be). It may be possible that you have to enter the IP of the file server somewhere on your router depending on configuration though that would be strange.

Check your basics though.

1. On windows boxes do an ipconfig /all and on linux a ifconfig eth0 to make sure they are getting local ip addresses (again thats 192.168.x.x)

As far as only being able to read files as a regular user, are these SMB shares? How are you accessing them? please be as specific as possible.
 
Old 10-17-2003, 03:55 PM   #3
ToniT
Senior Member
 
Registered: Oct 2003
Location: Zurich, Switzerland
Distribution: Debian/unstable
Posts: 1,357

Rep: Reputation: 47
Even if you use the router with dhcp server you should be able to detect the ip-address of the windows-machine by broadcasting the subnet.

About the root access, you probably mount the samba share as root. You should either
do it as an ordinary user or define the uid-option to the mount command (see 'man smbmount' for details).

If I understand correctly, the router assigns ip-addesses to local network (that is,
ips that are not visible to the internet (192.168.x.x, 10.x.x.x.x and 172.16-31.x.x)), so
the problem with static addresses has probably something to do with incorrect subnet
range (netmask, etc.) so that the router doesn't see the machine having the ip assigned statically.
 
Old 10-17-2003, 04:09 PM   #4
hildog
Member
 
Registered: Sep 2003
Location: New York, NY
Distribution: Red Hat 9
Posts: 33

Original Poster
Rep: Reputation: 15
I'm halfway there...still need help with permissions

Okay,

I think I've solved everything related to static and dynamic IP addresses...the server has its own static IP address and the router is dynamically assigning IP addresses to everything else. And I now have the server accessing the internet...I forgot to put in some DNS numbers to go along with the static IP address.

For my next trick, I need to be able to access the windoze server via Linux and achieve rwx access as a regular user...I currently have rwx access as super user, but I only have r-x/755 access as a regular user. Here's the part of my fstab that pertains to the server:

//mediaserver/media /mnt/mediaserver smbfs username=HillaryKnox, password=******,auto,rw 0 0

I don't know if there's something there that needs to be changed, or if it would make any difference ?

Last edited by hildog; 10-17-2003 at 06:06 PM.
 
Old 10-17-2003, 09:41 PM   #5
ToniT
Senior Member
 
Registered: Oct 2003
Location: Zurich, Switzerland
Distribution: Debian/unstable
Posts: 1,357

Rep: Reputation: 47
Have you tried putting 'uid=account' (where account is the name the user who should own the files) to the mount flags as I suggested?. Also dmode and fmode flags might be usefull.
 
Old 10-17-2003, 10:10 PM   #6
hildog
Member
 
Registered: Sep 2003
Location: New York, NY
Distribution: Red Hat 9
Posts: 33

Original Poster
Rep: Reputation: 15
Well that worked...in the midst of all the networking stuff I was trying to do, I forgot to change the uid flag in fstab...it worked like a charm. Then I thought to myself that I would try to use gid instead of uid - so maybe someone else besides me could access the server some day...and that worked too, but I still can't change the permissions. The problem with not being able to change the permissions is that they seem to be locked as rwxr-xr-w - so, naturally, if I'm only in the group, I still don't have write privelages.

So I guess for now I have a workable solution...but now I'm thinking ahead to the future when I might want a group to be able to access it.

Thanks.
 
Old 10-18-2003, 10:16 AM   #7
ToniT
Senior Member
 
Registered: Oct 2003
Location: Zurich, Switzerland
Distribution: Debian/unstable
Posts: 1,357

Rep: Reputation: 47
Sorry, a thinko. I was supposed to say dmask and fmask flags.

Something like 'fmask=002' in the fstab should give the write access to the group.
 
Old 10-18-2003, 06:06 PM   #8
hildog
Member
 
Registered: Sep 2003
Location: New York, NY
Distribution: Red Hat 9
Posts: 33

Original Poster
Rep: Reputation: 15
Well, I got it working. I can read and write to the server via group access (which is what I really wanted to do). But for some reason, I had to do it this way:

//mediaserver/media /mnt/mediaserver smbfs fmask=770, dmask=770,username=HillaryKnox,password=*****,gid=hildog,auto,rw,0 0

By the way, these '770' permissions are the exact inverse of how I thought masking was supposed to work...what's the deal with that ? I would have thought that '002' would give owner & group rwx access, and give others read only (?) access.

Maybe I just had it backwards.
 
  


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
Boot dilemma zatka Linux - Software 2 05-17-2005 08:51 AM
Debian Dilemma habala Linux - Newbie 3 12-31-2004 12:47 PM
dilemma?(perl) akaash Programming 1 04-03-2004 04:06 PM
CD-R/RW dilemma neo77777 General 10 09-07-2002 09:42 AM
X Windows dilemma nuzzy Linux - Newbie 5 07-04-2002 11:42 PM

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

All times are GMT -5. The time now is 03:38 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