Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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.
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:
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.
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.
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:
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.