LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-08-2001, 10:00 AM   #1
Sathe
Member
 
Registered: Sep 2001
Location: Bryan, Ohio USA (Home of the Etch-A Sketch)
Distribution: RedHat 7.1, 7.2, and 7.3
Posts: 76

Rep: Reputation: 15
chmod


i moved my MP# drive to my linux server so i could share mp3's between computers. but now can't save to the drive, it says i don't have rights, the folders and files are all owned by root, i've tried doing a "chmod 777" and that doesn't work, on both the mp3's and the folders, but it stays the same........i don't have a copy of my samba script handy, but i do know that i have those directories set to public=yes writable =yes

any ideas?
 
Old 11-08-2001, 11:24 AM   #2
isajera
Senior Member
 
Registered: Jun 2001
Posts: 1,635

Rep: Reputation: 45
check in the fstab to see if it's been mounted as read/write. i had the same problem a few months back and went crazy using chmod to no avail.
 
Old 11-09-2001, 08:28 PM   #3
Sathe
Member
 
Registered: Sep 2001
Location: Bryan, Ohio USA (Home of the Etch-A Sketch)
Distribution: RedHat 7.1, 7.2, and 7.3
Posts: 76

Original Poster
Rep: Reputation: 15
i added these two lines to my fstab file

/dev/hdb1 /mnt/mp3.1 msdos defaults 1 1
/dev/hdd1 /mnt/mp3 msdos defaults 1 1

but it still won't let me do a CHMOD to them, what am i missing?
 
Old 11-09-2001, 09:33 PM   #4
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
Who is the owner and group for the folder and files
 
Old 11-09-2001, 09:53 PM   #5
Sathe
Member
 
Registered: Sep 2001
Location: Bryan, Ohio USA (Home of the Etch-A Sketch)
Distribution: RedHat 7.1, 7.2, and 7.3
Posts: 76

Original Poster
Rep: Reputation: 15
owner and group are root
but if i try to do a chgrp it tells me permission denied, even though i am logged in as root.
if i don't have the drives mounted to those directories, i can change the rwx attributes on them its only after i mount thoses that i can't change it
 
Old 11-09-2001, 10:36 PM   #6
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
So it's the files on the disk that are read only?

Quote:
i moved my MP# drive to my linux server so i could share mp3's between computers. but now can't save to the drive, it says i don't have rights, the folders and files are all owned by root, i've tried doing a "chmod 777" and that doesn't work, on both the mp3's and the folders, but it stays the same........i don't have a copy of my samba script handy, but i do know that i have those directories set to public=yes writable =yes

If you moved the drive it will be a local drive that you would mount not a samba share.


if you run the mount command it will show them like this

[david@microdot david]$ mount
/dev/hda5 on / type ext2 (rw)

make sure it is rw not ro



Samba shares would look like these but they are not on the same machine.

[root@alpha david]# mount | grep //
//winme/pub on /lan/winme type smbfs (0)
//win98/pub on /lan/win98 type smbfs (0)

 
Old 11-09-2001, 10:39 PM   #7
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
Are you trying to write to it from a windows machine
 
Old 11-09-2001, 10:50 PM   #8
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
does it look like this when it's mounted
[root@alpha /]# ls -l
drwxr-xr-x 20 root root 4096 Oct 27 17:20 pub


can you write to it locally and not as a share?
 
Old 11-10-2001, 09:55 AM   #9
Sathe
Member
 
Registered: Sep 2001
Location: Bryan, Ohio USA (Home of the Etch-A Sketch)
Distribution: RedHat 7.1, 7.2, and 7.3
Posts: 76

Original Poster
Rep: Reputation: 15
yes, thats exactly what it looks like

and yes i am trying to write from a windows machine, i'm getting an access denied error

this is what i get after i run the mount command

/dev/hdb1 on /mnt/mp3.1 type msdos (rw)
automount(pid835) on /misc type autofs (rw,fd=5,pgrp=835,minproto=2,maxproto=3)
/dev/hdd1 on /mnt/mp3 type vfat (rw)

Last edited by Sathe; 11-10-2001 at 09:58 AM.
 
Old 11-10-2001, 09:25 PM   #10
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
here is the section of my smb.conf showing my shared folder

[pub]
path = /work/pub
writeable = Yes
browseable = yes
level2 oplocks = Yes

-------------------------------------------------------
also you should have this in smb.conf

security - SHARE
encrypt passwords = Yes


not user, and setup windows the same way.

------------------------------------------------------
this line in smb.conf will cause a log file for each machine which may give you some info after trying to access a share

log file = /var/log/samba/%m.log


[root@alpha samba]# cat winme.log
[2001/10/24 01:39:18, 1] smbd/service.c:make_connection(550)
winme (10.0.0.2) connect to service pub as user david (uid=500, gid=500) (pid 28914)
[2001/10/24 01:40:36, 1] smbd/service.c:close_cnum(581)
winme (10.0.0.2) closed connection to service pub

------------------------------------------------------
these lines will grant access to your users by interface, username and ip address.
Note that eth0 is not allow a connection, it is my internet interface.

interfaces = eth1 eth2 127.0.0.1
bind interfaces only = yes
valid users = david
hosts allow = 10.0.0. 11.0.0. 127.0

-------------------------------------------------------
By binding ppp0 to eth1, eth2 or the lo interface my dialup client will still be able to access the shares. (you may not be doing this yet)

-------------------------------------------------------
you can try adding a new user if you already have all this.

also you may try it with this in smb.conf

username = david
guest account = david

------------------------------------------------------
and be sure to add the user by running

smbadduser unixname:sambaname

then run

smbpasswd sambaname

-------------------------------------------------------


Last edited by DavidPhillips; 11-10-2001 at 09:46 PM.
 
Old 11-10-2001, 10:03 PM   #11
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
I forgot to ask

can you see the folder in network neighborhood
 
Old 11-11-2001, 12:01 PM   #12
Sathe
Member
 
Registered: Sep 2001
Location: Bryan, Ohio USA (Home of the Etch-A Sketch)
Distribution: RedHat 7.1, 7.2, and 7.3
Posts: 76

Original Poster
Rep: Reputation: 15
ok, i went into FSTAB and have now am able to mount is on boot, and write to it......BUT it mounts it as a msdos file system and has taken all of my long named Mp3's and changed them into into the 8 character naming convention. is there any way to get around that?

and yes i can see it in my network neighborhood, it wasn't a samba issue as much as a mount issue
 
Old 11-11-2001, 09:01 PM   #13
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
great!

I see this in your earlier post

/dev/hdb1 on /mnt/mp3.1 type msdos (rw)


I guess it is not vfat!

well if it is vfat then use


mount -t vfat /dev/hdb1 /mnt/mp3.1


to try it

you need to unmount it first

umount /dev/hdb1

or umount /mnt/mp3.1

Maybe use windows to convert it to fat32 if it isn't.


If it works just change fstab from msdos to vfat

 
Old 11-12-2001, 08:07 AM   #14
Sathe
Member
 
Registered: Sep 2001
Location: Bryan, Ohio USA (Home of the Etch-A Sketch)
Distribution: RedHat 7.1, 7.2, and 7.3
Posts: 76

Original Poster
Rep: Reputation: 15
hey man, thanks for all your help!
i'll try changing it to vfat in fstab when i get home, thanks again.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to use Chmod Centinul Linux - Newbie 8 06-30-2005 10:44 AM
What can we do if we type chmod ugo-x /bin/chmod ?????? bunny123 Linux - Software 3 02-01-2005 08:53 PM
CHMOD in shell : chmod 777 /usr/ <---is that right? cpanelskindepot Programming 5 07-16-2004 05:37 AM
Chmod gibbylinks Linux - Newbie 1 10-23-2003 11:17 AM
chmod u+s csDraco_ Slackware 6 04-22-2003 08:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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