LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-05-2004, 10:40 PM   #1
DirtyDan
Member
 
Registered: Aug 2004
Posts: 41

Rep: Reputation: 15
NTFS Permissions


In Samba, without having the right permisions to a shared folder, I will get the NT_STATUS_BAD_NETWORK_NAME error; Easily fixed with chmod 777 (or +r or something similar) to the folder. But, I would like to share a folder on my NTFS drive. There is no way to set permissions for this folder, and without doing so, I am stuck without access. chmod -R 777 /(folder name) would work great, but as stated i can not modify permissions. Is there a way to work samba around this?

Im sorry, I realize this is somewhat of a double-post, but my old thread was extremely ambigous and badly worded, not to mention written at a point where samba was not even running

Thanks!
 
Old 10-05-2004, 11:01 PM   #2
NetSnake
LQ Newbie
 
Registered: Sep 2004
Location: China
Distribution: Debian 3.0r2 unstable
Posts: 28

Rep: Reputation: 15
Are you sure your kernel support NTFS write config?
I assumed you must have this value to do your work.
 
Old 10-05-2004, 11:05 PM   #3
DirtyDan
Member
 
Registered: Aug 2004
Posts: 41

Original Poster
Rep: Reputation: 15
No, I don't have write support on my kernel, but I wont be using this either. All I want to do is play MP3 files on this linux box on my downstairs XP machine that has ~1gb hd space, these files being on the NTFS partition of the linux box. They only need read-only access, but samba wont give me permission to even view them! Ugh.... Im so lost

Are you saying that for samba to let me in I have to recompile my kernel with NTFS write support? Hmmm wheres that config file.. I think I still have the kernel saved.....

Last edited by DirtyDan; 10-05-2004 at 11:14 PM.
 
Old 10-05-2004, 11:30 PM   #4
NetSnake
LQ Newbie
 
Registered: Sep 2004
Location: China
Distribution: Debian 3.0r2 unstable
Posts: 28

Rep: Reputation: 15
If that, you can try
mount -t smbfs -o umask=777 // I'm not very sure, may be 000
to mount your share?
 
Old 10-05-2004, 11:49 PM   #5
DirtyDan
Member
 
Registered: Aug 2004
Posts: 41

Original Poster
Rep: Reputation: 15
so it would be mount -t smbfs -o umask=777 //localhost/ntfs-c/ /home/

Or something? I cant get anything to work, and my shares are all screwed up now, and Lisa stopped working (giving the erno : 98 port in use error) and.... To format and start clean or not to format....

Lisa is still screwy but I restarted samba and stuff and now it's OK again. I just shared everything for testing purposes (didnt chmod it all ) and now doing smb://192.168.1.100/root/ I can view every file and folder pretty much, EXCEPT for the /ntfs-c/ folder! It asks for a username and password: surely this is not my windows logon, is it? I know that the ntfs filesystem is supposed to be secure like that (or something)

Last edited by DirtyDan; 10-06-2004 at 07:21 AM.
 
Old 10-06-2004, 07:38 AM   #6
nordickiwi
Member
 
Registered: Oct 2004
Location: Stockholm Sweden
Distribution: Fedora 1-8,Familiar v0,7.2, Redhat 9.0, Knoppix, CentOS, Windows 2003,2000,XP,98,95, Exc
Posts: 39

Rep: Reputation: 15
to start with stating the obvious,
-that you have installed some sort of NTFS support in your kernel, i use Fedora so it's an easy rpm for me. http://linux-ntfs.sourceforge.net/rpm/about.html

-you have mounted the ntfs partition so it mounts at every boot, to the folder /ntfs-c for exemple.
- write permissions for ntfs from linux is a myth, unless you regard that you can actually write to ntfs as long as you don't change the file size!!!! duh.
- you have created a samba share that looks somewhat like this
[ntfs-c]
comment = mp3
path = /ntfs-c/mp3
writeable = no
browsable = yes
public = yes

- you must have done this.
useradd john
passwd john
*set a password x 2 *


cat /etc/passwd | mksmbpasswd.sh > /etc/samba/smbpasswd
*do this only once, preferably after you have created all the samba users you need*

smbpasswd john
*enter the same password x2 as you will use to log into the windows machine*

service smb restart

Login to the windows machine as john. and you should be able to access the mp3 share, without any login screens.
*if the mp3 file are mounted to a folder that is in another users /home/user folder oth than /home/john you may have access problems. So usually mount stuff like this /mp3 /film so alla samba usera can access them. Sharing users home directories to other user's is a hassel.
*If you still can't read/access the share check the file permisions and do a chmod -R 755 /ntfs-c as root.
Hope this helps.

Last edited by nordickiwi; 10-06-2004 at 07:54 AM.
 
Old 10-06-2004, 06:42 PM   #7
DirtyDan
Member
 
Registered: Aug 2004
Posts: 41

Original Poster
Rep: Reputation: 15
Ok, maybe im just pathetic, but im still having problems. I chmod-ed all the files to 755. Then I did:
useradd basement$ (name of machine)
passwd thepassword
smbpasswd -a -m basement$
(Type new SMB password etc.........

Ok, so when I try to open the folder (which now shows up, hurray!) on my XP machine, It says it can not be found or is inaccesible. Maybe my current SMB conf-file will shed some light. (i think something with my path is screwy, although it works in konsole and testparm says its OK...)

Code:
[global]
workgroup = MSHOME
wins support = yes
encrypt passwords = yes
browsable = yes
security = share

[Mp3]
comment = mp3
path = /ntfs-c/Documents\ and\ Settings/All\ Users/Documents/Music/
writeable = no
browseable = yes
public = yes
I also tried logging the error, and it is : /ntfs-c/Documents\and\ Settings/All\ Users/Documents/Music/'
does not exist or is not a directory, when connecting to [Mp3]

Getting around this for now, I did get using simply "/ntfs-c" as the path. I can logon internally atleast with that path, but my XP machine is still struggling. How exaclty do I log on? I added the user as that machine (basement$), but isnt there more to it? Or am I going about that all wrong? I mean, even internally as root I have to provide a password, I dont understand what to do through the other comp. Hell, even if I went 0 security with no users and just the nobody account functioning freely I would be happy

The XP machine is named basement, with 1 user Administrator and password admin.
 
Old 10-06-2004, 10:04 PM   #8
DirtyDan
Member
 
Registered: Aug 2004
Posts: 41

Original Poster
Rep: Reputation: 15
The XP machine can see the samba share fine, and it shows the directories, but the windows machine is still not logging in correctly. I just setup the 'client for windows networks' client, but to no avail. Is there a specific logon script I need to create for the machine? Does the capital in 'Administrator' yield any adverse effects? Thanks
 
Old 10-07-2004, 03:13 AM   #9
nordickiwi
Member
 
Registered: Oct 2004
Location: Stockholm Sweden
Distribution: Fedora 1-8,Familiar v0,7.2, Redhat 9.0, Knoppix, CentOS, Windows 2003,2000,XP,98,95, Exc
Posts: 39

Rep: Reputation: 15
ok, well done so far your nearly there,
two things come to mind.
-You MUST log onto the XP machine with the same account that you created earlier!! in your case the user basement$. Of course you must firstly create this user on your XP machine with the same Password you used when you did a smbpasswd, becuase when you click on a samba share from windows the samba server checks first the windows account & password that you are currently log in with, if it is the same as a varified samba user then you will be granted access, otherwise you will recieve a login in screen (hope that made sense).

-You share, it seems it would be easier to mount the whole windows partition and share the whole thing as well...then you don't have to worry a linux/samba having to figure out stupid "spaces" i file names. Try adding this to the bottom of your /etc/fstab file, (adjust the hda1 if you have windows on another partition)

/dev/hda1 /ntfs-c ntfs defaults,umask=0022,user 0 0

then adjust your samba share to this,

[Mp3]
comment = mp3
path = /ntfs-c
writeable = no
browseable = yes
public = yes

- set wins support to No, as I'm sure your not using a wins server at home.........not many companies use a wins server.
wins support = No

-Reboot you samba Machine, (to remount the /ntfs-c partition correctly) start the samba server again if not allready set to start at boot.
-Logon to your XP machine with basement$ user, hopefully the $ sign hasn't caused any issues (otherwise go throug the whole useradd stuff again with user administrator.)
access you Mp3 share and browse your way to you music and enjoy, maybe create a simple link to the music folder for easy access.
 
Old 10-14-2004, 08:53 PM   #10
DirtyDan
Member
 
Registered: Aug 2004
Posts: 41

Original Poster
Rep: Reputation: 15
I have long fixed the login problems now

BUT: NTFS mounted directory absolutely refuses to let me share it; it is a read only drive, and its read-write access cannot be altered nor made available to anyone but the owner, from what I can tell. Is there any possible way to get this to work?!?!?!? PLEASE! I am so close, I can read and write to all the other folders, do anything I want, but I cannot share the NTFS file-system folder.

If its unclear what I mean, I have the partition mounted to /ntfs-c, and, upon trying to access it from the other computer, the log file reads "(chdir /ntfs-c) failed" , because I do not have nor can set/change permissions. This is horribly redundant, but I have everything set as it needs to be, and am running on version 3.0.5.

 
Old 10-15-2004, 05:08 PM   #11
DirtyDan
Member
 
Registered: Aug 2004
Posts: 41

Original Poster
Rep: Reputation: 15
Might I be able to change some properties of the mounted drive by the script mounting it on boot, so that I am able to share it? Or should I just scrap the idea and make a FAT32 partition to do my dirty work.
 
Old 09-11-2005, 09:03 PM   #12
SirAeryn
LQ Newbie
 
Registered: Sep 2005
Location: Port Hedland, Western Australia
Distribution: Fedora Core 4
Posts: 18

Rep: Reputation: 0
Sharing your NTFS partition can be done - it's just a pain in the a#$%.
The problem is with SELinux and the mount security context.

See my thread http://www.linuxquestions.org/questi...hreadid=361699
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
ntfs partition permissions trawler Linux - General 2 10-23-2005 05:27 PM
NTFS access permissions ALInux Linux - General 3 10-16-2005 12:11 PM
ntfs permissions Palamides Slackware 6 02-23-2005 07:42 PM
NTFS volume permissions zasten Linux - Newbie 2 02-25-2004 10:13 PM
ntfs write permissions asc3ndant Linux - General 2 07-11-2003 12:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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