LinuxQuestions.org
Visit Jeremy's Blog.
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-13-2004, 03:23 AM   #1
Sc0pE
Member
 
Registered: Aug 2004
Location: Northern Ireland
Distribution: Suse 9.3
Posts: 46

Rep: Reputation: 15
directory access


hey ive mounted my harddrive and now only root can see the contents and when i try and change the permissions on it it sais its a read only file system i can log in as root and access it and play my mp3's etc but cant as a normal user, anyone help ?
 
Old 08-13-2004, 03:46 AM   #2
gojamiegirl
LQ Newbie
 
Registered: Aug 2004
Location: Wildomar, California
Distribution: Arch Linux
Posts: 12

Rep: Reputation: 0
It sounds like it is mounted read-only. You may just need to edit the mounting options in the file /etc/fstab (or in your gui if that's your style!)

Here's what mine looks like

/dev/hda1 / ext3 noatime 1 1
none /dev/pts devpts mode=0620 0 0
/dev/hda6 /home ext3 noatime 1 2
/dev/hdc /mnt/cdrom auto umask=0,user,iocharset=iso8859-1,codepage=850,noauto,ro,exec 0 0
none /proc proc defaults 0 0
/dev/hda5 swap swap defaults 0 0
none /mnt/removable supermount dev=/dev/scsi/host0/bus0/target0/lun0/part1,fs=ext2:vfat,--,umask=0,iocharset=iso8859-1,kudzu,codepage=850 0 0


Everybody else puts a quote so...

There are 4 boxes to use in the defense of liberty: soap, ballot, jury, ammo. Use in that order. Starting now -- ???
 
Old 08-13-2004, 01:29 PM   #3
Sc0pE
Member
 
Registered: Aug 2004
Location: Northern Ireland
Distribution: Suse 9.3
Posts: 46

Original Poster
Rep: Reputation: 15
i dont know excatly what i need to add or edit so that i can access it as a normal user...
 
Old 08-13-2004, 03:43 PM   #4
gojamiegirl
LQ Newbie
 
Registered: Aug 2004
Location: Wildomar, California
Distribution: Arch Linux
Posts: 12

Rep: Reputation: 0
Sorry I wasn't more clear in my help, let's try again, we'll get it eventually.

What distribution are you using? Are you OK in the command line? This a second hard drive? Internal/External? IDE/SATA/USB? What does your /etc/fstab look like? What filesystem type are you trying to mount?. You may have trouble writing to it if it is Windows NTFS.

Also, if you haven't already, take a look at the man pages for mount and fstab
Code:
$ man mount
1. Make a copy of your /etc/fstab file as a backup

2. Remove any lines (if any) from your (active) /etc/fstab referring to the drive you are having trouble with

3. You need a line like this in /etc/fstab. Replace /dev/hdb1 with your device node and /mnt/drive2 with your desired mount point throughtout my instructions

Code:
/dev/hdb1 /mnt/drive2 auto users,rw,exec
4. Then you should be able to use these commands to (un)mount it. You need to remount after making any changes to /etc/fstab

Code:
mount /mnt/drive2
to mount the filesystem

Code:
umount /mnt/drive2
to unmount the filesystem


If none of this works, you can at least put your old /etc/fstab back.

If this is a drive that you mount/unmount often try/modify this script and make a launcher to click.

Code:
#!/bin/bash
#
# drivemount.sh
# This script will do something or other
# Version 0.2 completed 7-14-04
# Copyright (C) 2004 Jamie Carranza
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
#
# You can find the full GNU General Public License online at:
#
# http://www.gnu.org/licenses/gpl.html
#
#	or on your local Gnuberry system at:
#
# opt/gnuberry/Licenses/gpl.html
#
#
# Contact:
#
#	jamie@gnuberrycomputers.com	http://gnuberrycomputers.com
# 			
#	35626 Aster Dr.
#	Wildomar, CA  92595

#######################################################################################

# FUNCTIONS AND VARIABLES

###########################################


FAMPID="$(ps -A | grep fam | cut -d" " -f2)"



#####################

KILLFAM ()
{
kill -9 $FAMPID
}



## Find out which drive to work with and set the variable "$DRIVE" ##

if
	[ "cat /etc/mtab | grep removable" -o "cat /etc/fstab | grep removable" ]
then
	DRIVE=/mnt/removable
elif
	[ "cat /etc/mtab | grep memory_stick" -o "cat /etc/fstab | grep memory_stick" ]
then
	DRIVE=/mnt/memory_stick
fi





#********************
#********************


MOUNTED ()
{
cat /etc/mtab | grep $DRIVE &>/dev/null
}

#*********

MOUNT ()
{
	echo "

	Would You Like To Add $DRIVE To The Filesystem? (y,n)
"
read -s -n 1 OK

if
	[ $OK = y -o $OK = Y ]
then

	mount $DRIVE
	MOUNTED && echo "	$DRIVE Has Been Added To The Filesystem

Press Enter To Close Window
"
read ready

exit 0

fi
}

#*********

UNMOUNT ()
{
	echo "

	Would You Like To Remove $DRIVE From The Filesystem? (y,n)
"
	
read -s -n 1 OK

if
	[ $OK = y -o $OK = Y ]
then
	umount $DRIVE
fi

if
	MOUNTED
then
	KILLFAM
	umount $DRIVE
fi


if
	! MOUNTED
then
	echo "

	$DRIVE Has Been Removed From The Filesystem

  Press Enter To Close Window"

	read ready

	exit 0
else
	echo "
  There Was An Error Unmounting $DRIVE"

	read ready
	exit 0

fi
}



#######################################################################################

# MAIN PROGRAM

###########################################


if
	MOUNTED
then
	UNMOUNT
elif
	! MOUNTED
then
	MOUNT
fi
 
Old 08-14-2004, 05:03 AM   #5
Sc0pE
Member
 
Registered: Aug 2004
Location: Northern Ireland
Distribution: Suse 9.3
Posts: 46

Original Poster
Rep: Reputation: 15
hey ive got it auto mounted at startup, thanx, but still no user access only root , im using suse 9.1 personal, its an internal ide hard drive and its ntfs and yea i can use the command line, my fstab looks like this after i followed your instructions to auto mount it...

/dev/hda6 / reiserfs acl,user_xattr 1 1
/dev/hda5 swap swap pri=42 0 0
devpts /dev/pts devpts mode=0620,gid=5 0 0
proc /proc proc defaults 0 0
usbfs /proc/bus/usb usbfs noauto 0 0
sysfs /sys sysfs noauto 0 0
/dev/cdrecorder /media/cdrecorder subfs fs=cdfss,ro,procuid,nosuid,nodev,exec,iocharset=utf8 0 0
/dev/hdd1 /mnt/20gig auto users,rw,exec
mount /mnt/20gig

this was it previously

/dev/hda6 / reiserfs acl,user_xattr 1 1
/dev/hda5 swap swap pri=42 0 0
devpts /dev/pts devpts mode=0620,gid=5 0 0
proc /proc proc defaults 0 0
usbfs /proc/bus/usb usbfs noauto 0 0
sysfs /sys sysfs noauto 0 0
/dev/cdrecorder /media/cdrecorder subfs fs=cdfss,ro,procuid,nosuid,nodev,exec,iocharset=utf8 0 0
/dev/hdd1 /mnt/20gig ntfs defaults 0 0

its something simple i know but what ?
 
Old 08-14-2004, 05:44 AM   #6
Sc0pE
Member
 
Registered: Aug 2004
Location: Northern Ireland
Distribution: Suse 9.3
Posts: 46

Original Poster
Rep: Reputation: 15
hey i got it, thanx for your help
 
  


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
Directory Access in proftpd kruserm Linux - Software 4 01-04-2005 09:09 AM
Samba access by Windows users locking out directory access with Konqueror harry_fine SUSE / openSUSE 1 12-18-2004 06:33 AM
Access directory from specific IP mikeshn Linux - General 1 12-19-2003 02:57 PM
How do I access my Root Directory chaswp54 Linux - Security 2 10-20-2001 04:05 PM
directory access iquadri1 Linux - Networking 0 09-29-2001 02:35 PM


All times are GMT -5. The time now is 01:42 PM.

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