LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 12-02-2008, 10:06 AM   #1
DarkFlame
Member
 
Registered: Nov 2008
Location: San Antonio, TX, USA
Distribution: Ubuntu Server 8.10 & SAMBA 3.2.3
Posts: 158
Blog Entries: 1

Rep: Reputation: 30
Sharing read/write/create/delete rights


I've gotten Linux OpenSuSE 11.0 with the latest available SAMBA all working. I've gotten my two users able to access the SuSE/SAMBA data drive so that we can both create folders and move our data off our desktop machines (WinXP Pro) to the SuSE SAMBA data drive. And, we can both see the data created on the SuSE/SAMBA data drive from our own machines. So far, so good.

HOWEVER, If I have April create a folder, from her computer, on the SuSE/SAMBA data drive, I cannot, from MY computer, change anything about the folder - I cannot delete files from the folder, cannot delete the folder, and cannot add files to the folder. PLUS, if I create a folder, from my own computer, on the SuSE/SAMBA data drive, she cannot, from HER computer, change anything about the folder - she cannot delete files from the folder, cannot delete the folder, and cannot add files to the folder.

This is a problem because we both manipulate the data on each other's machines (from our own machines - shared access to each other's hdd), and I want us to both be able to do that with the data on the SuSE SAMBA data drive. We're both migrating and combining data from our two desktops to the SuSE/SAMBA data drive.

I'm sure this is ASTID ("Another Stupid Thing I've Done" or, more appropriately, "Another Stupid Thing I'm Doing") and that there's a REALLY SIMPLE solution. But, I'm struggling trying to figure it out.

Both of us are in the USER group, and it's (the USER group) got Read/Write access to the SuSE/SAMBA data drive, and we can both read & write on it, we can both create folders and files, and we can both move folders and files off our local drives (both are WinXP Pro) to the SuSE/SAMBA data drive. And, we can both see and read the folders created by the other, and can copy data from those folders to our own desktops. The only thing we can NOT do is to manipulate data (files and/or folders) that the other put there.

I'm getting closer, conquering (Konquering) one issue at a time. Once this one is solved, I'm SURE I'll find another that will give me trouble. But, I'm not going down that road until I've traveled this one!

THANK YOU FOR THE HELP!!!
David
San Antonio, TX

Last edited by DarkFlame; 12-02-2008 at 10:19 AM. Reason: slight update
 
Old 12-02-2008, 03:12 PM   #2
mostlyharmless
Senior Member
 
Registered: Jan 2008
Distribution: Arch/Manjaro, might try Slackware again
Posts: 1,851
Blog Entries: 14

Rep: Reputation: 284Reputation: 284Reputation: 284
Hoping this helps, from

http://us1.samba.org/samba/docs/man/...html#id2608351

There is a workaround to solve the permissions problem. It involves understanding how you can manage file system behavior from within the smb.conf file, as well as understanding how UNIX file systems work. Set on the directory in which you are changing Word documents: chmod g+s `directory_name'. This ensures that all files will be created with the group that owns the directory. In smb.conf share declaration section set:


force create mode = 0660
force directory mode = 0770
 
Old 12-02-2008, 07:09 PM   #3
DarkFlame
Member
 
Registered: Nov 2008
Location: San Antonio, TX, USA
Distribution: Ubuntu Server 8.10 & SAMBA 3.2.3
Posts: 158

Original Poster
Blog Entries: 1

Rep: Reputation: 30
Quote:
Originally Posted by mostlyharmless View Post
Set on the directory in which you are changing Word documents: chmod g+s `directory_name'.
MostlyHarmless: I'm hoping this will work with ALL files, including (especially) ones we're simply moving from our desktops to the server. That is just as important (moreso, right now) than creating fresh files from MS-Word. If it's different for files moved and/or files created from other non-MS applications (such as PDFs, JPGs, MP3s, etc.), then I'll need to set up each one? I'll try the fix when I get home this evening (after 8 pm), but if it's more complicated for multiple file types (than just DOCs), I'll need to implement all the options.

THANKS A BUNCH for the info. I'm hoping it helps, too!
 
Old 12-02-2008, 10:19 PM   #4
DarkFlame
Member
 
Registered: Nov 2008
Location: San Antonio, TX, USA
Distribution: Ubuntu Server 8.10 & SAMBA 3.2.3
Posts: 158

Original Poster
Blog Entries: 1

Rep: Reputation: 30
Quote:
Originally Posted by mostlyharmless View Post
Hoping this helps, from

http://us1.samba.org/samba/docs/man/...html#id2608351

There is a workaround to solve the permissions problem. It involves understanding how you can manage file system behavior from within the smb.conf file, as well as understanding how UNIX file systems work. Set on the directory in which you are changing Word documents: chmod g+s `directory_name'. This ensures that all files will be created with the group that owns the directory. In smb.conf share declaration section set:


force create mode = 0660
force directory mode = 0770
I did make both changes, executing the chmod command and adding a [share] entry into smb.conf that contained the two lines. It didn't work. Then, I found in YaST2 a way to, I think, do the same thing. That didn't work. Then, I rebooted the server & both WinXP Pro clients, and it all worked. So, I'm not sure if it would have worked after one or the other, with a reboot, or what, but it worked.

Now, if I can just figure out how to make the J: drive (that's the SuSE/SAMBA server folder on the RAID5 drive that I've mapped to from the XP desktops) show up in Windows Explorer. I can type J: in the address bar of explorer, and it opens the folders as the J: drive. But, it just doesn't automatically appear. Yes, I've done the reconnect on restart check-box, and it is connected, it just doesn't appear as if it were part of the computer (even tho the drives I've mapped on each XP box to the other XP box do). I'm sure this is an XP thing & not a big deal. And, it will probably be a moot point once I completely get rid of XP and migrate totally to OpenSuSE desktops, too.

So, now that I've gotten it setup the way I want (but haven't moved any data), I'm going to break it down completely and re set it up from scratch, so that I can document for myself exactly what I must do in the event that the Linux OS hard drive crashes (it's installed on it's own, dedicated physical drive). And, once I have that done, I'm going to yank out the 80 GB drive and replace it with one of the other ones that's been untouched, and make sure my instructions to myself will work the way I expect them to. THEN, I'm going to yank out one of the 4 RAID drives and see how much data gets lost. Finally, when I'm happy that the whole thing is pretty much bullet proof - save for an asteroid falling through the roof - I'm going to take the whole thing & tuck it away someplace far away so that I don't have to lisetn to this frigging tornado of a fan keeping the drive array cool!

And, that concludes this rant!
 
Old 12-03-2008, 08:34 AM   #5
mostlyharmless
Senior Member
 
Registered: Jan 2008
Distribution: Arch/Manjaro, might try Slackware again
Posts: 1,851
Blog Entries: 14

Rep: Reputation: 284Reputation: 284Reputation: 284
Glad it worked for you. Maybe this will help with network drive thing in XP:

http://www.microsoft.com/windowsxp/u.../mapdrive.mspx
 
Old 12-03-2008, 09:44 AM   #6
DarkFlame
Member
 
Registered: Nov 2008
Location: San Antonio, TX, USA
Distribution: Ubuntu Server 8.10 & SAMBA 3.2.3
Posts: 158

Original Poster
Blog Entries: 1

Rep: Reputation: 30
Quote:
Originally Posted by mostlyharmless View Post
Glad it worked for you. Maybe this will help with network drive thing in XP:

http://www.microsoft.com/windowsxp/u.../mapdrive.mspx
I have to access the folder a little bit differently, but I have mapped the drive J: to the folder that I want. However, when I start Windows Explorer, the J: drive does not appear until I actually type it into the location bar. Then, it appears, but only for the Explorer session. Once Explorer is closed, it goes away and we must type the J: into the location bar the next time we open Explorer.

By virtue that we can open the folder by typing simply J: into the location bar, I know that the mapping is still there. Plus, if I go to remap it, the J: drive still shows the proper path. It's just not showing up in Explorer on the Folders pane until we actually type the J: into the location bar. This seems to be unique to Linux as it is not an issue with the shared drive on my wife's computer being in the Folder pane of my computer, or visa-versa. And, when we had the Novel NetWare network, it was fine, too. So, I don't know what's happening with OpenSuSE, tho I expect it's something with the XP machines. Something.

However, because the solution is ALMOST as simple as clicking on the J: drive, I'm not too concerned about it. This is an issue with which we can deal, and I'm not going to spend much time trying to solve it. I could spend a lifetime trying to solve some of the little problems and never beat the big problems.

One other thing to note. Once I created a Samba user of the same username and password as we use on our XP machines, we no longer have to login to the server to get access - simply logging in to our desktops, via the same login method we've been using for years, gets us to the server without any further security barriers. That makes me happy, as it's easier. Plus, anyone who would steal our machines would be unable to get access to either the server or our desktops without our personal passwords, unless, possibly, they removed the Linux OS disk and replaced it with another and mounted the RAID array drive. But, then, even the guys who built Fort Knox can break into it, so I'm not terribly concerned. I just don't want those pictures of me & the wife showing up on the Internet
 
Old 12-04-2008, 09:12 AM   #7
DarkFlame
Member
 
Registered: Nov 2008
Location: San Antonio, TX, USA
Distribution: Ubuntu Server 8.10 & SAMBA 3.2.3
Posts: 158

Original Poster
Blog Entries: 1

Rep: Reputation: 30
Quote:
Originally Posted by mostlyharmless View Post
Glad it worked for you. Maybe this will help with network drive thing in XP:

http://www.microsoft.com/windowsxp/u.../mapdrive.mspx
Sometimes the most frustrating issues have the simplest solutions. I've solved the problem of the mapped drive's "disappearance" in Windows XP. I simply changed "My Documents" from the F: drive (that resides on my computer) and changed it to the J: drive that is the server hard drive. Now, when I open Windows Explorer, it pops right up to My Documents on the J: drive. No more typing "J:" to get the drive to appear!

As usual, ASTID (Another Silly Thing I'm Doing) requires a couple of steps backwards, away from the problem, and then the solution magically appears, somewhere between my ears, while I'm doing something completely unrelated - like taking the twins to school!

Yet another problem solved!
 
Old 12-04-2008, 09:30 AM   #8
mostlyharmless
Senior Member
 
Registered: Jan 2008
Distribution: Arch/Manjaro, might try Slackware again
Posts: 1,851
Blog Entries: 14

Rep: Reputation: 284Reputation: 284Reputation: 284
I was reading your blog; just thought I'd mention that dmraid -rE {device} (see man dmraid for details) can get rid of RAID metadata, though your solution worked too.

http://linux.die.net/man/8/dmraid

Last edited by mostlyharmless; 12-04-2008 at 09:32 AM.
 
Old 12-04-2008, 09:42 AM   #9
DarkFlame
Member
 
Registered: Nov 2008
Location: San Antonio, TX, USA
Distribution: Ubuntu Server 8.10 & SAMBA 3.2.3
Posts: 158

Original Poster
Blog Entries: 1

Rep: Reputation: 30
Quote:
Originally Posted by mostlyharmless View Post
I was reading your blog; just thought I'd mention that dmraid -rE {device} (see man dmraid for details) can get rid of RAID metadata, though your solution worked too.

http://linux.die.net/man/8/dmraid
I've found that it is mostly easier to work backwards through a process to fix an issue, than to try to go forward another direction to fix it. This technique has served me well when I'm doing something completely unfamiliar. I am thoroughly amazed at how far I've gotten with this project, considering how very little I know about what I'm doing. If I were getting paid to be a professional at this, it'd be a different story. But, working it for myself, it doesn't matter if I don't know the words or the music - I can still sing the song!

However, it's good to know that the dmraid command is available for such things. Thank you for the pointer!
 
  


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
Colecting information about users that read/write/delete in a directory aclica Linux - Newbie 2 11-15-2007 05:25 PM
Find users how read/write/delete in a directory aclica Linux - Newbie 4 11-14-2007 06:41 AM
How to Deny Users to Delete, but Allow Write/Read and Exec ManRSA Linux - Security 3 11-21-2006 02:02 AM
samba is sharing, but xp can't read or write drstobbe Linux - Networking 5 07-24-2004 12:24 AM
How to Read, Write, Execute but not Delete r042wal Linux - Software 6 06-07-2003 11:05 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:06 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
Open Source Consulting | Domain Registration