[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: networking with linux



On Fri Feb 28 2003 at 20:14, "Stergios Bletsos" wrote:

> I managed to install my redhat 7.3 on two seperate pcs .
> I use xp and linux , xp canread from a mounted fat32 partition
> via samba but i can't get it to write in that partition (says no
> access, write protect etc)  . is there something i can do to alter
> this?

This sounds exactly like an ownership or permissions problem, either
on the filesystem or via samba.

  Check the logs in /var/log/samba/* to confirm it: for sure it will
  say "permission denied" any time the network user attempted write
  to that partition.

  Watch the output of "tail -0f /var/log/samba/* &" and then watch
  things happen while you try writing to it again.

Make sure that the fat32 partition is mounted with "sane" options so
that there is enough read-write access for the network user who
needs to use it.

I tend to mount vfat paritions like this (in /etc/fstab):

/dos	/dev/hda1	vfat	uid=0,gid=0,fmask=644,dmask=755	0 0

However, you might want to alter the uid, gid and file/dir mask
values with 666 and 777 to allow open read/write access by anyone.
You might also want to make the directory mount-point itself (eg
/dos) mode 777 (read/write all users).


Perhaps 664 and 775 might be enough to limit access to specific
users if the network user is in the same group as the gid the
partition has been mounted with.

  Note that when dealing with FAT32 partitions, you have to specify
  how the files and directories are "translated" to unix (or else
  default values are used).  (More on this below).

Now check the settings on the /dos share in /etc/samba/smb.conf...

[fat32]
   comment		= shared FAT32 partition
   path			= /dos
   guest ok		= ues
   browseable		= yes
   writeable		= yes
   directory mask	= 0777	# or 0775
   create mask		= 0644	# or 0664
   # write list		= xpuser

Something like that anyway :)

It is possible to get samba to do all sorts of things with
ownerships and permissions on a per-share or per-user basic.

Check the result with "smbclient -L linuxbox -N".

> Funny thing is i can read/write on other areas .(/tmp , /home , /netlogon)

Yes, the remote user would already have correct ownership and
permissions in these places.  Although normally /netlogon should be
a privileged area, usually read-only except by admin.

> another thing is i can't get the two pcs while running linux to
> ftp (i use the wuftp) i can ftp  from xp to linux. even though it
> takes 2-3 minutes to get access.

That's not good, and a totally different problem.

Ok, I assume that you have the daemon installed and running
("chkconfig wu-ftpd on").

  Check the tcp_wrapper access permissions in /etc/hosts.allow and
  /etc/hosts.deny (allow from 127.0.0.1 and from the IP/network that
  your xp box is coming from, deny the rest).  There are man pages,
  but in essence:

# /etc/hosts.allow
in.ftpd:	127.0.0.1 \
	192.168.1.0/255.255.255.0

# /etc/hosts.deny
in.ftpd:	ALL

Make sure that your local firewall isn't denying access to ports 20
and 21 ("iptables --line-numbers -nvL").

Try ftp to localhost on the linux box - does that work?

If nothing changes and still no clues, then watch the network
traffic with something like "tcpdump -ni eth0 port 20 or port 21".
That should give you more clues.

> is there a way to see a network like , enviroment in redhat?

There is a way to work in just about any network environment with
redhat.  Honestly, it's windows that has all the limitations :)

> i m not very good in unix like environments (need practice) but i
> manage to get things done through research. This time i've spend 3
> working days but still i can't get it to work.

Welcome to linux/unix.  Yes, it is a very different environment and
yes, practice is needed -- experience is a big teacher.  Well done
so far (really!).

Your problem is almost certainly concerned with ownership and
permissions... windows has only vague concepts of user and group
(and essentially no idea of these concepts internally).

  A central design concept with unix is that every file and every
  running process has ownership and permissions.  Windows added this
  as an after-thought, but it is essentially based on an ancient
  dos-based hidden/system/ro/archive scheme on files (with nt
  extensions), and "security zones" internally.

  The problem faced by a samba server is that it must translate
  between these two very different environments... when going from
  windows to unix, remote network users must have a valid local unix
  user UID/UID, umask and so on when accessing a unix box, and you
  tell samba in smb.conf how you want it to handle these issues.  In
  many ways, samba's implementation of netbios is much better than
  how microsoft have done it.

> thanks in advance for any replies

No worries, good luck.  You are so, so close...  :)

> stergios
> Thessaloniki
> Greece

Cheers
Tony
---*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-
 Tony Nugent <Tony*linuxworks.com.au>
 Gold Coast             Qld Australia





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]