LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 02-24-2009, 07:58 AM   #1
NannoBot
LQ Newbie
 
Registered: Feb 2005
Posts: 4

Rep: Reputation: 0
Debian: Wireless network and fstab issues


Hi folks,

First of all, my sincere apologies if these questions have already been answered in other threads. They are both fairly common topics, but each has a huge amount of variability within it. I have done much googling in the last few days, much of which has led me to this site, but never to the answers I need.

Ok background info: new install of Debian 5.0 amd64. Full hardware specs available if necessary, though my issues don't seem to be hardware dependent.

First issue: Wireless networking.
- I have already set up SSID, key types, dhcp, etc for wlan0.
- During startup, I can see the DHCP requests etc, and when the kernel receives an IP address which it binds to wlan0
- Occasionally (haven't been able to figue the exact conditions when this will occur), I am able to log in (either locally or by remote SSH) and ping an outside site for a short period of time. Usually though, by the time I log in, the interface has lost its connection to the outside world (but not its IP address)
- Once the connection to the world is lost, route -n shows that there is no default gateway configured
- Connection to internet can be restored by logging in as root and running "# /etc/init.d/networking restart". Once this is done, it's all systems go, and stays that way. Default GW returns and stays.

I am wondering if anyone could provide insight into why the connectivity is lost. If you need outputs of any commands just ask and they are yours. Also, if there is no way to prevent this, what is the best way to automate the restart process.

Second question: fstab/mounting NTFS partitions
- I want to mount 3 NTSF patitions to be readable but not writable by everyone (I have not yet persued the ntfs-3g option).
- Here is my fstab file:

AMON-RA:/home/brad# cat /etc/fstab
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/sda1 / ext3 errors=remount-ro 0 1
/dev/sda4 none swap sw 0 0
/dev/hda /media/cdrom0 udf,iso9660 user,noauto 0 0
/dev/sda2 /mnt/ntfs1 ntfs auto,user
/dev/sda3 /mnt/ntfs2 ntfs auto,user
/dev/sdb1 /mnt/ntfs3 ntfs auto,user

- The folders in /mnt have the following permissions BEFORE mounting:

AMON-RA:/mnt# ls -l
total 12
dr-x------ 2 brad brad 4096 2009-02-24 00:35 ntfs1
dr-x------ 2 brad brad 4096 2009-02-24 00:35 ntfs2
dr-x------ 2 brad brad 4096 2009-02-24 00:35 ntfs3

But AFTER mounting:

AMON-RA:/mnt# ls -l
total 32
dr-x------ 1 root root 4096 2009-02-20 02:24 ntfs1
dr-x------ 1 root root 8192 2009-02-20 02:24 ntfs2
dr-x------ 1 root root 20480 2009-02-21 13:51 ntfs3

After mounting, the NTFS partitions are not readable by any users other than root. Can someone explain what is going on and how to fix it so all users can read the files after mounting? Again, write access is not required.

Again, I apologise if these questions have been previously address, but none of the existing solutions I found seem to fit the exact circumstances. Let me know if something needs clarification.

Thanks for the help.

BC.
 
Old 02-24-2009, 08:19 AM   #2
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,085

Rep: Reputation: 398Reputation: 398Reputation: 398Reputation: 398
The network problem.
My kubuntu 8.04 (debian-based) does the same.
So I put these lines into /etc/rc.local just before the final exit 0
Code:
# Restart stupid wireless inerface
/etc/init.d/networking restart
Problem solved, or, rather, "worked-around".

Mounting.
Try (as root)
Make your fstab lines look like this:
Code:
/dev/sda2 /mnt/ntfs1 ntfs auto,user,ro
/dev/sda3 /mnt/ntfs2 ntfs auto,user,ro
/dev/sdb1 /mnt/ntfs3 ntfs auto,user,ro
Then (as root)
Code:
chmod  555  /mnt/ntfs?
mount  -a
Better?

Welcome to LQ!
 
Old 02-25-2009, 02:47 AM   #3
NannoBot
LQ Newbie
 
Registered: Feb 2005
Posts: 4

Original Poster
Rep: Reputation: 0
Thanks tredegar. The networking issue seems to have been solved. I'm interested to know if there is an underlying cause to the problem that has been addressed. But at this moment, I am just happy that it all works fine!

As the fstab issue, still no joy with that one. Made the changes you suggested, and I'm still getting Permission Denied messages when trying to read the NTFS partitions. Can't even umount as a normal user now. Any further ideas?

BC.
 
Old 02-25-2009, 04:29 AM   #4
NannoBot
LQ Newbie
 
Registered: Feb 2005
Posts: 4

Original Poster
Rep: Reputation: 0
Ok I have had a win with the fstab problem. I made fstab look like the following:

AMON-RA:/etc# cat /etc/fstab
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/sda1 / ext3 errors=remount-ro 0 1
/dev/sda4 none swap sw 0 0
/dev/hda /media/cdrom0 udf,iso9660 user,noauto 0 0
/dev/sda2 /mnt/ntfs1 ntfs auto,users,ro,uid=brad,gid=brad,umask=006
/dev/sda3 /mnt/ntfs2 ntfs auto,users,ro,uid=brad,gid=brad,umask=006
/dev/sdb1 /mnt/ntfs3 ntfs auto,users,ro,uid=brad,gid=brad,umask=006

This gives me the following permissions:

brad@AMON-RA:/mnt$ ls -l
total 32
dr-xr-x--x 1 brad brad 4096 2009-02-20 02:24 ntfs1
dr-xr-x--x 1 brad brad 8192 2009-02-20 02:24 ntfs2
dr-xr-x--x 1 brad brad 20480 2009-02-21 13:51 ntfs3

So I can access all files on the partitions, in read only. I don't think it's the most elegant solution, but it works! Thanks for the help.
 
Old 02-25-2009, 08:37 AM   #5
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,085

Rep: Reputation: 398Reputation: 398Reputation: 398Reputation: 398
Glad network is working.

Mounting is still wrong though, if you want others to read from the ntfs partitions.
Your permissions are
r-xr-x--x
which means only the user brad, or those belonging to the group brad can read the disk.

So I fired up an old dual-boot PC, and tested it out.
The following should work for you:
As root:
Code:
chmod 555 /mnt/ntfs?
[ the "?" in the line above is not a mistake and will match /mnt/ntfs1 /mnt/ntfs2 and mnt/ntfs3 ]
Then use these lines in fstab
Code:
/dev/sda2       /mnt/ntfs1        ntfs   auto,users,ro,umask=222
/dev/sda3       /mnt/ntfs2        ntfs   auto,users,ro,umask=222
/dev/sdb1       /mnt/ntfs3        ntfs   auto,users,ro,umask=222
Re-mount everything (as root) with
Code:
mount -a
Should be fixed up now, with all the files in those partitions having permissions of r-xr-xr-x
 
Old 02-26-2009, 03:13 AM   #6
NannoBot
LQ Newbie
 
Registered: Feb 2005
Posts: 4

Original Poster
Rep: Reputation: 0
Huzzah! Good sir Tredegar, I am indebted to you! It worked exactly how I wanted it!

Many thanks for your help!

Last edited by NannoBot; 02-26-2009 at 03:14 AM. Reason: Spelt your name wrong - sorry.
 
Old 03-03-2009, 05:52 PM   #7
crsouza
LQ Newbie
 
Registered: Mar 2009
Distribution: Debian
Posts: 2

Rep: Reputation: 0
Hi there,

I see you guys are using "ntfs" as the filesystem type. Last time I checked, the default ntfs kernel driver would happily and faithfully corrupt your partition if you enabled read-write access and tried to overwrite files past their original size. Is kernel-space read-write access safe by now?
 
Old 03-04-2009, 06:26 AM   #8
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,085

Rep: Reputation: 398Reputation: 398Reputation: 398Reputation: 398
ntfs-3g is reported as supporting write to ntfs filesystems, but I have not used it.
http://sourceforge.net/projects/ntfs-3g/
But NannoBot only wanted read-access anyway.
 
Old 03-04-2009, 05:33 PM   #9
crsouza
LQ Newbie
 
Registered: Mar 2009
Distribution: Debian
Posts: 2

Rep: Reputation: 0
I've been using ntfs-3g for a while now, but some time ago I reinstalled debian in my machine and went out mounting partitions and editing some files as I was configuring the box. But only some hours later I noticed ntfs-3g wasn't amoung the installed packages and I was probably using the kernel-mode ntfs driver because 'mount /dev/sda1 /mnt/windows' was working fine.

Thanks god nothing bad happened, but this made me wonder about the current status of the ntfs kernel drive by now. I couldn't find any recent information about it, only old threads back from when it was messing up partitions.


Also sorry if I am commenting something totally unrelated to NannoBot's original problem, it just came to my mind when I saw the discussion
 
  


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
[Debian stable] Fstab issues - can't write to mounted partitions alk77 Debian 13 09-21-2008 10:34 AM
IBM T30 Debian Wireless Issues e-b-p Linux - Newbie 2 10-16-2007 02:59 PM
Wireless Network Installation And Sound Issues Jonj1611 Slackware - Installation 10 05-06-2007 02:20 PM
Battery & Wireless Network Issues ! ! ! Be.Gurmeet.Be Linux - Hardware 7 04-28-2006 05:14 PM
Debian laptop/network issues Levitate Debian 6 08-03-2004 04:20 PM


All times are GMT -5. The time now is 07:01 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration