Hi all, I have a hassle with a Samba server and file permissions. I have set the "create mode" setting to set files to permissions 755, however only permissions of 700 are being created on the files. Is there a "permissions HOWTO" explaning how permissions are implemented by Samba? Regards, Graham -- ----------------------------------------- graham@vwv.com "There's a moon VWV Interactive over Bourbon Street tonight...
Dear Samba Gurus, How do we configure Samba so that It will keep the UNIX file permissions intact after that file is being EDITED (Not CREATED) by windows applcations. For example, there is a file called test.doc and it has a file permission of 700 for owner, group and others respectively. Currently, after I use word to edit this file its file permission will change to 744 or to whatever value "create mask" is set to. I can always change its permission back to what it was from Unix but I think there would be a better way of doing this. I am looking forward to hear your feedback. Thanks very much. Quynh Hoang System administrator CSC AUSTRALIA
On Thu, 25 Jun 1998, Quynh Hoang wrote:> How do we configure Samba so that It will keep the UNIX file permissions > intact after that file is being EDITED (Not CREATED) by windows > applcations.The answer to this is to use an editor which edits the file you specify, not one which creates a new file, then renames it. Charlie Brady - Telstra |internet: cbrady@ind.tansu.com.au Network Products |Snail : Locked Bag 6581, GPO Sydney 2001 Australia Platform Technologies |Physical : Lvl 2, 175 Liverpool St, Sydney 2000 IN-Sub Unit - Sydney | Phone: +61 2 9206 3470 Fax: +61 2 9281 1301
Hello, I am new to Samba and to this list and I have a question to make: Is there any way to allow users write in a public directory shared with Samba and, at the same time, deny the removal of any file in the same directory. This users have not an account in the Linux side so they log as the guest user. I am using Red Hat Linux 5.2 and Samba 1.9.18p10. Thanks everybody
On Thu, Feb 11, 1999 at 07:12:06PM +1100, Guillermo wrote:> Hello, > > I am new to Samba and to this list and I have a question to make: > Is there any way to allow users write in a public directory shared > with Samba and, at the same time, deny the removal of any file in the > same directory. This users have not an account in the Linux side so they > log as the guest user. > > I am using Red Hat Linux 5.2 and Samba 1.9.18p10. > > Thanks everybody >Hi look at the permissions the /tmp directory has. I should have them set that way, that users can create files, but only delete files they own. Greetings, Florian Pflug
We are currently running a windows 2000 domain. We have a samba server (not part of the domain) that serves as a file server. We are able to change the Unix security definitions for files via the GUI security tab, but we have trouble using the cacls command. We are able to set the Unix everyone permissions via: cacls filename /T /E /D Everyone However, I am not able to set either the Unix user or group permissions. It returns an error "No mapping between account names and security IDs was done". The Microsoft site describes this error as an NT pre SP4 problem and was fixed in sp4. (see http://support.microsoft.com/support/kb/articles/q183/7/18.asp) I have also tried using the chmod command part of the Microsoft Windows Services for Unix 2.0. This reported no errors, but also had no effect.... Any ideas... Joel Handler
Joel Handler wrote: | I have also tried using the chmod command part of the Microsoft | Windows Services for Unix 2.0. This reported no errors, but also | had no effect.... Hmmn: I'd quite forgotten ther might be such a thing. Anyone know more about it? I've only seen the blurb at http://www.microsoft.com/TechNet/winnt/Winntas/prodfact/revguide/ntunixrg.asp --dave -- David Collier-Brown, | Always do right. This will gratify some people 185 Ellerslie Ave., | and astonish the rest. -- Mark Twain Willowdale, Ontario | //www.oreilly.com/catalog/samba/author.html Work: (905) 415-2849 Home: (416) 223-8968 Email: davecb@canada.sun.com
Hi, How can i make every file that is created in a directory have the permission 777 this is my conf. [public dir] path = /mnt/disk1/lijsten Writeable = Yes Public = Yes Create Mask = 0775 I tried different Create Mask but no success Thank you, Joeri
Hi everyone I'm trying to get my head around the way Samba sets file permissions. I'm running Samba 2.2.2 on RH7.1 and have a test setup with a few NT4 workstations. The relevant bit of smb.conf looks like this: [common] path = /shared/common read only = No create mask = 0777 directory mask = 0777 map archive = No (defaults for force create mode and security mask) Creating a file in the directory from an NT machine results in a file with permissions: -rw-rw-rw- Why aren't the x bits set? Thanks in advance. Tim Allen timallen@ls82.fsnet.co.uk
Tim, I have the same problem, when creating Samba I creating using user root, so when I created a directory so everything is belong to user root. I'm setting the shared for that directory, the configuration that you give below can override the unix permission ? Because when my user from MS Workstation login using a login script and connect to the shared drive, it can see the file there but can't write to that directory to change or even add more files.... Regards, Medici Sent by: samba-admin@lists.samba.org To: <samba@lists.samba.org> cc: (bcc: Medici/Kawan_Lama) Subject: Re: File permissions Found the answer to this. Directory permissions were drwxrwxrwx. But to ensure the x bits got set, need force create mode = 0777 (default is 00) Unix permissions = force_create_mode | (mapped_mode & create_mask) The mapped_mode was 0666, not 0777. Hope that explanation's right! Tim Allen> What are the permissions on the directory you are creating these fileson?> Joel > On Fri, Nov 30, 2001 at 05:17:54PM -0000, Tim Allen wrote: > > Hi everyone > > > > I'm trying to get my head around the way Samba sets file permissions.I'm> > running Samba 2.2.2 on RH7.1 and have a test setup with a few NT4 > > workstations. > > > > The relevant bit of smb.conf looks like this: > > > > [common] > > path = /shared/common > > read only = No > > create mask = 0777 > > directory mask = 0777 > > map archive = No > > > > (defaults for force create mode and security mask) > > > > Creating a file in the directory from an NT machine results in a filewith> > permissions: > > > > -rw-rw-rw- > > > > Why aren't the x bits set?-- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba Medici ----------------------------------------------------------------------------------------------- PT. Kawan Lama Sejahtera. Jl Puri Kencana No 1, Jakarta,11610 - Indonesia Ph. +6221-5828282, Fax. +6221-5820088, http://www.kawanlama.com To celabrate Moslem day Idul Fitri 16-17 Dec. 2001, Christmas 25 Dec. 2001 and New Year 1 Jan. 2002 our office will be closed from 15 Dec. 2001 to 1 Jan. 2002, and will be started on 2 Jan. 2002 -----------------------------------------------------------------------------------------------
I am running Samba 2.2.2 on AIX 4.3.3. We want to have the file permissions set to 775 for all files created in the samba shares. I tried adding the line create mask = 0775 to the share, but that still didn't work. The file permissions are set to 664. Anybody know of a way to get the permissions set the way I want? Thanks, Jim Jim Warter Chicago Board Options Exchange (312) 786-7510 warterj@cboe.com
James Warter <warterj@cboe.com> wrote on 22.01.2002 16:01:39:> >I am running Samba 2.2.2 on AIX 4.3.3. We want to have the file >permissions set to 775 for all files created in the samba shares. I tried >adding the line create mask = 0775 to the share, but that still didn't >work. The file permissions are set to 664. Anybody know of a way to get >the permissions set the way I want? > >Thanks, >JimHi Jim, try force create mask = 0775 create mask = 0000 Ciao Oliver -- Good programming is 40% experience, 30% skill, 20% RTFM, 10% caffeine, and 5% attention to detail. Oliver Six, CEO CAHOS GmbH, Cimbernstr. 51, Germany 81377 Muenchen Phone +49 89 71 01 93 40, Fax +49 89 71 01 93 41
Guys... hope somebody can give me some tips. I just installed samba and created some shares... the problem I have is with file permissions. For example.. I added a share that has: [Facturas] comment = Facturas browseable = yes available = yes public = no read only = no printable = no path = /var2/Facturas create mask = 0777 read list = pespinosa, vmontiel, pcardel, jcabanas, gestevez, gzamudio, eperez, creveles, azaldivar, aarchundia write list = mgarcia, ilopez, aserrano so according to this.. its not public so nobody should be able to get in except for those read list and write lists users right? well in the OS.. what are the permissions that the directory /var2/facturas needs to have in order for this to work? If it has 777 anybody can get in.. not only those users... but if I change it to 700... those users and nobody can get in... Hope you can help... Saludos Anton Krall Director de Tecnolog?a Inter.net M?xico / Panam? Tel; 5241-7609 Directo Tel: 5241-7600 Conmutador Celular: 0445-105-5160 Mobile ICQ: 4979450 email: akrall@team.inter.net web: http://www.mx.inter.net <http://www.mx.inter.net/> Outside Mexico: Office: +52(555)241-7609 PBX: +52(555)241-7600 Mobile: +52(555)105-5160 -------------- next part -------------- HTML attachment scrubbed and removed
Guys... hope somebody can give me some tips. I just installed samba and created some shares... the problem I have is with file permissions. For example.. I added a share that has: [Facturas] comment = Facturas browseable = yes available = yes public = no read only = no printable = no path = /var2/Facturas create mask = 0777 read list = pespinosa, vmontiel, pcardel, jcabanas, gestevez, gzamudio, eperez, creveles, azaldivar, aarchundia write list = mgarcia, ilopez, aserrano so according to this.. its not public so nobody should be able to get in except for those read list and write lists users right? well in the OS.. what are the permissions that the directory /var2/facturas needs to have in order for this to work? If it has 777 anybody can get in.. not only those users... but if I change it to 700... those users and nobody can get in... Hope you can help... Saludos Anton Krall Director de Tecnolog?a Inter.net M?xico / Panam? Tel; 5241-7609 Directo Tel: 5241-7600 Conmutador Celular: 0445-105-5160 Mobile ICQ: 4979450 email: akrall@team.inter.net web: http://www.mx.inter.net <http://www.mx.inter.net/> Outside Mexico: Office: +52(555)241-7609 PBX: +52(555)241-7600 Mobile: +52(555)105-5160 -------------- next part -------------- HTML attachment scrubbed and removed
public = no is not what you want, it is a synonym for "guest ok" this means that with public=no only users with a valid account on your unix can connect. what you need is: valid users = mgarcia, ilopez, aserrano, pespinosa, vmontiel, pcardel, jcabanas, gestevez, gzamudio, eperez, creveles, azaldivar, aarchundia read list = pespinosa, vmontiel, pcardel, jcabanas, gestevez, gzamudio, eperez, creveles, azaldivar, aarchundia -----Oorspronkelijk bericht----- Van: Anton Krall Verzonden: wo 13/03/2002 18:07 Aan: samba@lists.samba.org CC: Onderwerp: [Samba] file permissions Guys... hope somebody can give me some tips. I just installed samba and created some shares... the problem I have is with file permissions. For example.. I added a share that has: [Facturas] comment = Facturas browseable = yes available = yes public = no read only = no printable = no path = /var2/Facturas create mask = 0777 read list = pespinosa, vmontiel, pcardel, jcabanas, gestevez, gzamudio, eperez, creveles, azaldivar, aarchundia write list = mgarcia, ilopez, aserrano so according to this.. its not public so nobody should be able to get in except for those read list and write lists users right? well in the OS.. what are the permissions that the directory /var2/facturas needs to have in order for this to work? If it has 777 anybody can get in.. not only those users... but if I change it to 700... those users and nobody can get in... Hope you can help... Saludos Anton Krall Director de Tecnolog?a Inter.net M?xico / Panam? Tel; 5241-7609 Directo Tel: 5241-7600 Conmutador Celular: 0445-105-5160 Mobile ICQ: 4979450 email: akrall@team.inter.net web: http://www.mx.inter.net <http://www.mx.inter.net/> Outside Mexico: Office: +52(555)241-7609 PBX: +52(555)241-7600 Mobile: +52(555)105-5160
I have got my Samba file shareing to work, now I can not seem to get the permissions worked out like I would like. I would like admin and joe to have read and write access to all 4 folders. When I try to write to any folder except admin logged in as admin I can not write. Can some one direct me to a detailed document on how Linux handles file permissions or the best way to do samba fiel permissions. BTW why does directory . and .. have different permissions? File structure: Data \ }--admin }-joe }-user01 }-user02 Users: admin, joe, user1, user2 Groups:admins, joe Smbusers:user01, user02 Group membership:admins-admin, joe smbusers-user01, user02 File permissions of data directory: drwxrwxrwx root root . drwxr xr x root root .. drwxr xr x admin admins admin drwxr xr x joe admins joe drwxr xr x user1 smbusers user1 drwxr xr x user2 smbusers user2 Thanks, David
On Thu, 2002-04-25 at 17:41, David McBride wrote:> I have got my Samba file shareing to work, now I can not seem to get the > permissions worked out like I would like. > I would like admin and joe to have read and write access to all 4 folders. > When I try to write to any folder except admin logged in as admin I can not > write.you need to join admin and joe to the smbusers group and set the permissions on user1 and user2 to at least 775 for that to happen. I think that is an unusual configuration though - most users have exclusive write access to their home dirs (only root can also write there) you could make joe and admin admin users using the admin users directive> Can some one direct me to a detailed document on how Linux handles file > permissions or the best way to do samba fiel permissions.samba file perms ARE linux file permissionns (unless you are using ACLs) have a look at http://www.onlamp.com/pub/a/bsd/2000/09/06/FreeBSD_Basics.html> BTW why does directory . and .. have different permissions?because . refers to "this" directory and .. refers to the one above "this" one. and they may have different permissions> > Users: admin, joe, user1, user2 > Groups:admins, joe > Smbusers:user01, user02 > Group membership:admins-admin, joe smbusers-user01, user02 > File permissions of data directory: > drwxrwxrwx root root . > drwxr xr x root root .. > drwxr xr x admin admins admin > drwxr xr x joe admins joe > drwxr xr x user1 smbusers user1 > drwxr xr x user2 smbusers user2something is wrong with these - too many spaces between r and x for group and other. brad
-----Original Message----- From: Bradley W. Langhorst [mailto:brad@langhorst.com] Sent: Thursday, April 25, 2002 5:12 PM To: David McBride Cc: Samba "email list (E-mail) Subject: Re: [Samba] file permissions On Thu, 2002-04-25 at 17:41, David McBride wrote:> I have got my Samba file shareing to work, now I can not seem to get the > permissions worked out like I would like. > I would like admin and joe to have read and write access to all 4 folders. > When I try to write to any folder except admin logged in as admin I cannot> write.you need to join admin and joe to the smbusers group and set the permissions on user1 and user2 to at least 775 for that to happen. Does this mean add them to the admins group? I have already done that, if it means something different can you please give more detailed explanation. I think that is an unusual configuration though - most users have exclusive write access to their home dirs (only root can also write there) This unusual config may be because Im looking at things from a windoze network poing of view. Take a small office situation for example: an office manager and some workers. The workers need only access to thier directories, but the office manage may need to save files for the workers to correct or retype or what ever. What would be the prefered way of setting groups and permissions for a situation loke this? you could make joe and admin admin users using the admin users directive> Can some one direct me to a detailed document on how Linux handles file > permissions or the best way to do samba fiel permissions.samba file perms ARE linux file permissionns (unless you are using ACLs) have a look at http://www.onlamp.com/pub/a/bsd/2000/09/06/FreeBSD_Basics.html> BTW why does directory . and .. have different permissions?because . refers to "this" directory and .. refers to the one above "this" one. and they may have different permissions> > Users: admin, joe, user1, user2 > Groups:admins, joe > Smbusers:user01, user02 > Group membership:admins-admin, joe smbusers-user01, user02 > File permissions of data directory: > drwxrwxrwx root root . > drwxr xr x root root .. > drwxr xr x admin admins admin > drwxr xr x joe admins joe > drwxr xr x user1 smbusers user1 > drwxr xr x user2 smbusers user2something is wrong with these - too many spaces between r and x for group and other. I just did that to make all the columbs line up. brad Thanks again, David
This is a temporary fix until I get my students added, but here is what I want. I have a directory on my linux machine. /programs/bhs the permissions for bhs are 1777 jones:teach = (owner:group) In my smb.conf I have the following or there abouts(I have change it many times) [bhs] comment = bhs path = /programs/bhs writable = yes create mask = 770 force user = kreese force group = teacher My idea was that when the students login highschool:bhs = (user:group) and save to the directory that it would change the owner:group to kreese:teacher which it does. I also thought that since I had the sticky bit set on the folder that since they no longer were the owner or in the group (after the save) that they would not be able to delete it which they still can. What am I doing wrong? Thanks for any help. Scott Mayo Tech Coordinator Bloomfield Schools PH: (573) 568-4564 FX: (573) 568-5681 Pager: (800) 264-2535 X2549
Maybe you might get want you need if you fool around with umask in .bashrc Joel On Mon, Aug 19, 2002 at 07:25:38PM -0500, Scott Mayo wrote:> This is a temporary fix until I get my students added, but here is what I > want. > > I have a directory on my linux machine. > /programs/bhs > > the permissions for bhs are 1777 jones:teach = (owner:group) > > In my smb.conf I have the following or there abouts(I have change it many > times) > > [bhs] > comment = bhs > path = /programs/bhs > writable = yes > create mask = 770 > force user = kreese > force group = teacher > > My idea was that when the students login highschool:bhs = (user:group) and > save to the directory that it would change the owner:group to kreese:teacher > which it does. I also thought that since I had the sticky bit set on the > folder that since they no longer were the owner or in the group (after the > save) that they would not be able to delete it which they still can. What > am I doing wrong? > > Thanks for any help. > Scott Mayo > Tech Coordinator > Bloomfield Schools > PH: (573) 568-4564 > FX: (573) 568-5681 > Pager: (800) 264-2535 X2549 > > -- > To unsubscribe from this list go to the following URL and read the > instructions: http://lists.samba.org/mailman/listinfo/samba
One problem I see with this approach is how do you know the file is done being written before you move it? You might get unlucky and move half a file.> -----Original Message----- > From: Joel Hammer [mailto:Joel@HammersHome.com] > Sent: Tuesday, August 20, 2002 10:35 AM > To: Scott Mayo; samba@lists.samba.org > Subject: Re: [Samba] File permissions > > > Another approach. > > If what you are doing is getting the kids to send in school > assignments via > the share, why not write a cron job which monitors that > share, say ever 5 > secs, and when a file appears on the share, it is removed and stored > somewhere else.
This really has me flabbergasted. cp doesn't seem to care. I just tried tar, and it happily tarred an open file, or at least a file that was being writen to with a piping command. So, how is wholesale file corruption avoided when using tar as a backup program or mv'ing or cp'ing directories as a backup tool? Joel On Tue, Aug 20, 2002 at 12:03:40PM -0400, David Brodbeck wrote:> Most Linux utilities have no real concept of file locking. I think cp will > quite happily copy a file that's in the process of being written to. I'm > not sure what'd happen if you tried to mv or rm it. mv might be okay, as > long as it was to the same filesystem, since the inode would stay the same. > > > -----Original Message----- > > From: Joel Hammer [mailto:Joel@HammersHome.com] > > Sent: Tuesday, August 20, 2002 11:59 AM > > To: David Brodbeck; samba@lists.samba.org > > Subject: Re: [Samba] File permissions > > > > > > I would be surprised if linux would be so impolite as to > > attempt to move a > > file that was being writen to. Would cp or rm be so badly behaved? > > But, I get surprised everyday. > > I guess the only way to be sure is to try it out and see. > > Have the cron job > > run every second and start saving some big files. Or, you > > might use smbstatus to > > make sure the file wasn't in use before acting on it. > > Joel > > On Tue, Aug 20, 2002 at 11:27:42AM -0400, David Brodbeck wrote: > > > One problem I see with this approach is how do you know the > > file is done > > > being written before you move it? You might get unlucky > > and move half a > > > file. > > > > > > > -----Original Message----- > > > > From: Joel Hammer [mailto:Joel@HammersHome.com] > > > > Sent: Tuesday, August 20, 2002 10:35 AM > > > > To: Scott Mayo; samba@lists.samba.org > > > > Subject: Re: [Samba] File permissions > > > > > > > > > > > > Another approach. > > > > > > > > If what you are doing is getting the kids to send in school > > > > assignments via > > > > the share, why not write a cron job which monitors that > > > > share, say ever 5 > > > > secs, and when a file appears on the share, it is removed > > and stored > > > > somewhere else. > >
I tried mv, and like you predicted, that works fine. The piped output keeps flowing right to that file. Now, I wonder about permissions.... Joel On Tue, Aug 20, 2002 at 12:03:40PM -0400, David Brodbeck wrote:> Most Linux utilities have no real concept of file locking. I think cp will > quite happily copy a file that's in the process of being written to. I'm > not sure what'd happen if you tried to mv or rm it. mv might be okay, as > long as it was to the same filesystem, since the inode would stay the same. > > > -----Original Message----- > > From: Joel Hammer [mailto:Joel@HammersHome.com] > > Sent: Tuesday, August 20, 2002 11:59 AM > > To: David Brodbeck; samba@lists.samba.org > > Subject: Re: [Samba] File permissions > > > > > > I would be surprised if linux would be so impolite as to > > attempt to move a > > file that was being writen to. Would cp or rm be so badly behaved? > > But, I get surprised everyday. > > I guess the only way to be sure is to try it out and see. > > Have the cron job > > run every second and start saving some big files. Or, you > > might use smbstatus to > > make sure the file wasn't in use before acting on it. > > Joel > > On Tue, Aug 20, 2002 at 11:27:42AM -0400, David Brodbeck wrote: > > > One problem I see with this approach is how do you know the > > file is done > > > being written before you move it? You might get unlucky > > and move half a > > > file. > > > > > > > -----Original Message----- > > > > From: Joel Hammer [mailto:Joel@HammersHome.com] > > > > Sent: Tuesday, August 20, 2002 10:35 AM > > > > To: Scott Mayo; samba@lists.samba.org > > > > Subject: Re: [Samba] File permissions > > > > > > > > > > > > Another approach. > > > > > > > > If what you are doing is getting the kids to send in school > > > > assignments via > > > > the share, why not write a cron job which monitors that > > > > share, say ever 5 > > > > secs, and when a file appears on the share, it is removed > > and stored > > > > somewhere else. > >
It isn't. That's why it's best to do backups on a quiet system. (I do mine at 4 am. If people are editing files at 4 am, they have serious issues. ;) ) It's a bit of a trade-off. Personally I'd rather have a backup of part of a file than no backup at all, especially if it's a log file. That's a big sore point for me with backups under Windows, files that are constantly open for one reason or another, such as log files, can never be backed up. The only files it's usually a problem for are database files, where a partial update might mean corrupted tables or inconsistant indexes. The solution is to use the database's built-in backup functionality (MySQL, for example, has the ability to do this) or take measures to make sure the database won't be changed during the backup (shut down the server, or lock all the tables.)> -----Original Message----- > From: Joel Hammer [mailto:Joel@HammersHome.com] > Sent: Tuesday, August 20, 2002 12:26 PM > To: David Brodbeck; samba@lists.samba.org > Subject: Re: [Samba] File permissions > > > This really has me flabbergasted. > cp doesn't seem to care. > I just tried tar, and it happily tarred an open file, or at > least a file > that was being writen to with a piping command. > So, how is wholesale file corruption avoided when using tar > as a backup > program or mv'ing or cp'ing directories as a backup tool? > Joel
Thought it might. I learned this when I tried to rotate some logfiles by mv'ing them. The old file just keeps growing under the new name, until the server's forced to close the file handle. ;)> -----Original Message----- > From: Joel Hammer [mailto:Joel@HammersHome.com] > Sent: Tuesday, August 20, 2002 12:41 PM > To: David Brodbeck; samba@lists.samba.org > Subject: Re: [Samba] File permissions > > > I tried mv, and like you predicted, that works fine. The > piped output keeps > flowing right to that file. > Now, I wonder about permissions....
Joel, Welcome to the nasty world of backups. Everyone thinks of them as being a simple thing to control, but in reality they are pretty difficult. I have read that 50% of all backups have corrupted data on them for exactly the reasons you are mentioning. :< I had a Server backup fail for this reason at a Major Fortune 500 company a few months ago, and the group I was supporting was paying the internal backup team thousands of dollars a month to do the backups. :< They were supposed to be backup specialists, but were ignoring errors about open files!!!! Anyway, the standard *NIX statement is that it is the admins job to queise the system prior to performing the backup. i.e. Make sure there are no open files. Traditionally a backup window is defined each night. Then all the server apps are shutdown, backups performed, apps restarted. Some zealous admins use the fuser command to kill any remaining processes using a filesystem just prior to backing it up. Then unmount the FS and re-mount it read-only for the duration of the backup. Obviously, today's 7x24 operations cannot handle the multiple hour backup windows this requires, so a lot of enterprise class apps have added the ability to accept a queise command, you to your backup, then let them go again. i.e. Oracle does this for sure, but I think a lot of others do it as well. SInce this is for a 7x24 operation, it is your job to do the backup and get the app running again in just a few seconds as opposed to the multiple hours it normally takes. This is where snapshots and clones come into play. Either one can create a read-only FS image in just a few seconds. Then you mount and backup the image at your leisure. You mentioned Linux I think, and Linux supports LVM from Sistina which supports snapshots. (In theory anyway, I'm trying to get them to work as we speak, and they seem broken to me.) Other *NIX have other software to do this, and most external raid arrays support snapshots and clones in hardware. HTH Greg Freemyer Internet Engineer Deployment and Integration Specialist Compaq ASE - Tru64 v4, v5 Compaq Master ASE - SAN Architect The Norcross Group www.NorcrossGroup.com >> This really has me flabbergasted. >> cp doesn't seem to care. >> I just tried tar, and it happily tarred an open file, or at least a file >> that was being writen to with a piping command. >> So, how is wholesale file corruption avoided when using tar as a backup >> program or mv'ing or cp'ing directories as a backup tool? >> Joel >> On Tue, Aug 20, 2002 at 12:03:40PM -0400, David Brodbeck wrote: >> > Most Linux utilities have no real concept of file locking. I think cp >> will >> > quite happily copy a file that's in the process of being written to.=20 >> I'm >> > not sure what'd happen if you tried to mv or rm it. mv might be okay, >> as >> > long as it was to the same filesystem, since the inode would stay the >> same. >> >=20 >> > > -----Original Message----- >> > > From: Joel Hammer [mailto:Joel@HammersHome.com] >> > > Sent: Tuesday, August 20, 2002 11:59 AM >> > > To: David Brodbeck; samba@lists.samba.org >> > > Subject: Re: [Samba] File permissions >> > >=20 >> > >=20 >> > > I would be surprised if linux would be so impolite as to=20 >> > > attempt to move a >> > > file that was being writen to. Would cp or rm be so badly behaved? >> > > But, I get surprised everyday. >> > > I guess the only way to be sure is to try it out and see.=20 >> > > Have the cron job >> > > run every second and start saving some big files. Or, you=20 >> > > might use smbstatus to >> > > make sure the file wasn't in use before acting on it. >> > > Joel >> > > On Tue, Aug 20, 2002 at 11:27:42AM -0400, David Brodbeck wrote: >> > > > One problem I see with this approach is how do you know the=20 >> > > file is done >> > > > being written before you move it? You might get unlucky=20 >> > > and move half a >> > > > file. >> > > >=20 >> > > > > -----Original Message----- >> > > > > From: Joel Hammer [mailto:Joel@HammersHome.com] >> > > > > Sent: Tuesday, August 20, 2002 10:35 AM >> > > > > To: Scott Mayo; samba@lists.samba.org >> > > > > Subject: Re: [Samba] File permissions >> > > > >=20 >> > > > >=20 >> > > > > Another approach.=20 >> > > > >=20 >> > > > > If what you are doing is getting the kids to send in school=20 >> > > > > assignments via >> > > > > the share, why not write a cron job which monitors that=20 >> > > > > share, say ever 5 >> > > > > secs, and when a file appears on the share, it is removed=20 >> > > and stored >> > > > > somewhere else. >> > >=20 >> --=20 >> To unsubscribe from this list go to the following URL and read the >> instructions: http://lists.samba.org/mailman/listinfo/samba
> > > > > > > > > > > -----Original Message----- > > > > > > From: Joel Hammer [mailto:Joel@HammersHome.com] > > > > > > Sent: Tuesday, August 20, 2002 10:35 AM > > > > > > To: Scott Mayo; samba@lists.samba.org > > > > > > Subject: Re: [Samba] File permissions > > > > > > > > > > > > > > > > > > Another approach. > > > > > > > > > > > > If what you are doing is getting the kids to send in school > > > > > > assignments via > > > > > > the share, why not write a cron job which monitors that > > > > > > share, say ever 5 > > > > > > secs, and when a file appears on the share, it is removed > > > > and stored > > > > > > somewhere else. > > > >We used this approach (and still do) very successfully for school kids sending in assignments. We wrote a small C prog to get around issues such as two kids using the same filename by mistake (added a datestamp to the submitted filename). Our cron job clears the input share every 60 seconds. So far no corruption problems of any sort ... RIchard Smart
Just make sure it's the same file system, otherwise things might get funny. mv in the same filesystem simply changes the directory entries. mv between filesystems does a cp&rm combo. It'll change the inode, and might screw up the filehandle. Nir. -- Nir Soffer -=- Software Engineer, Exanet Inc. -=- "Father, why are all the children weeping? / They are merely crying son O, are they merely crying, father? / Yes, true weeping is yet to come" -- Nick Cave and the Bad Seeds, The Weeping Song> -----Original Message----- > From: Joel Hammer [mailto:Joel@HammersHome.com] > Sent: Tuesday, August 20, 2002 6:57 PM > To: David Brodbeck; samba@lists.samba.org > Subject: Re: [Samba] File permissions > > > Well, it sounds like mv might be the solution to this > problem. As soon as the file > shows up in the share, mv it to a directory that the users > can't get to. I > tried mv'ing a file, and it maintained the same permissions > as the original > user, which means, hopefully, that the user can keep saving > even if the file > is not done when it is mv'ed and it is in a different directory. > Joel > > On Tue, Aug 20, 2002 at 12:41:44PM -0400, David Brodbeck wrote: > > Thought it might. I learned this when I tried to rotate > some logfiles by > > mv'ing them. The old file just keeps growing under the new > name, until the > > server's forced to close the file handle. ;) > > > > > -----Original Message----- > > > From: Joel Hammer [mailto:Joel@HammersHome.com] > > > Sent: Tuesday, August 20, 2002 12:41 PM > > > To: David Brodbeck; samba@lists.samba.org > > > Subject: Re: [Samba] File permissions > > > > > > > > > I tried mv, and like you predicted, that works fine. The > > > piped output keeps > > > flowing right to that file. > > > Now, I wonder about permissions.... > -- > To unsubscribe from this list go to the following URL and read the > instructions: http://lists.samba.org/mailman/listinfo/samba >
Hi All I am using the PVCS application for the version control and this is in turn stored onto the unix system. We map it onto the windows using samba and use the same. my concern is when i use the pvcs , the files will be limited to the owners (unix) only and others will not be given privileges to use the same. If i want the others also to access the same i need to give the group permission also , but when given group permission the user will be free to delete the files too which cannot be tracked. is there any way to give users full access but the user should be restricted from deletion. Your response will be highly appreciated. Pls do the needfull . Thanks Regds Kumar __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com
I know I've seen the answer to this problem, even this week. Have you searched the mail archives? It had something to do with setting the sticky bit on the directory. Search and you will find. Josh -----Original Message----- From: kumar annamalai [mailto:kumar_srk@yahoo.com] Sent: Thursday, December 12, 2002 7:05 AM To: samba@lists.samba.org Subject: [Samba] File Permissions Hi All I am using the PVCS application for the version control and this is in turn stored onto the unix system. We map it onto the windows using samba and use the same. my concern is when i use the pvcs , the files will be limited to the owners (unix) only and others will not be given privileges to use the same. If i want the others also to access the same i need to give the group permission also , but when given group permission the user will be free to delete the files too which cannot be tracked. is there any way to give users full access but the user should be restricted from deletion. Your response will be highly appreciated. Pls do the needfull . Thanks Regds Kumar __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
Hello, I am having problems with multiple users being able to access the same file on a samba volume. I tried assigning the three users and the document all to a single group with no luck. So far we have had to chmod 777 the doc just to be able to read it. when a change is made the doc is reverted to the last person who changed it making it impossible for the next user to edit it. in addition, the group is changed back to the original settings as well. TIA Rich
I'm trying to understand how file permissions are handled by smbmount. I've setuid root both smbmnt and smbumount, so that regular users can mount and unmount samba shares. Pertinent options in /etc/fstab are users,rw,fmask=770 Rights are as follows: r-- r-- r-- :file permissions on the Samba server rwx rwx --- :fmask specified in /etc/fstab rwx r-x r-x :root user's umask rwx rwx r-x :regular users' umask drwx r-x r-x :permissions on mount point before mount drwx rwx --- :permissions on mount point after mount r-x r-x --- :mounted file permissions I would like to understand why I end up with 550 on the mounted files, instead of 440 (which are the file permissions on the server) or 770 (which are the rights specified by the fmask option). -- Oscar A. Valdez
Hi, I have set up Samba and got it to integrate with our existing windows 2000 domain, obtaining users list from our PDC. I'm currently bringing over win 2k users from roaming profiles onto Terminal Services and I'm copying their profile to the Samba server. The problem I'm getting is file permissions. If I copy the file over when I'm the administrator, the file owner will be administrator thorough even if I change it on the root file of the profile. Can anyone therefore tell me how to change the owner on all the files beneath the root profile folder. I think basically what I'm asking is whether all files can inherit permissions from its parent?? Thank You ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Iwan Davies Server Support and Development Technician Conger Sir Ceredigion County Council IT Section Finance Direct Tel 01970633206 Mobile 07813198152 Fax 01970633219 iwandav@ceredigion.gov.uk ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ******************************************************************************** Mae'r neges ebost hon, ynghyd ag unrhyw ffeiliau sydd ynghlwm wrthi, yn gyfrinachol ac at ddefnydd yr unigolyn neu sefydliad y cyfeiriwyd hi ato. Pe dderbynioch y neges hon mewn camgymeriad, byddwch mor garedig a rhoi gwybod i'r rheolwr system. Mae'r nodyn hwn hefyd yn cadarnhau bod y neges ebost hon wedi cael ei archwilio am bresenoldeb feirws cyfrifiadurol gan MIMEsweeper. ******************************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. ********************************************************************************
Samba List: I am running samba on Rh Linux 7.1 with samba 2.0.10. I have shares I want to force the user group ownerships with as well as setting file permissions. I have been using force user = and force group = and have been able to get new files to have this ownership. I have tried using create mask = 775 but when I create a file on this share through windows I get a file 765 permissions. How do I correct this to get the permissions the way I want? Bruce Embrey Bruce Edward Embrey : Linux Systems Manager Campus Email Admin : UNIX / Linux Administrator Hood College : embrey@hood.edu : Phone (301)696-3927
Hi i'm using samba as a file print server on suse 7.3, clients are windoze 95,2K,XP. basic problem is that sometimes the files created from a windows client have a ownership of root, this causes problems mainly with backup programs (as it affects/prevents the unix - dos archive bit mapping) as I don't then own it), i havn't set up a user root on the windows systems so how can this happen? btw if i set valid users to a set of user names this problem seems to go away, can anybody advise why the 'root' name appears as an aside how do i clear a username/password for a network share in windoze, as just deleting the share doesn't seemd to do this. thanks for any help rob Carter rob.carter@karterelectronic.com
hi thanks i think that will do the trick, just out of interest is the root ownership thing a bug, or something windows has done? rob carter
I have set up Samba so that all users on my small network can read from my one of my Linux shares as well as write to that share. However, when user A saves a file to that share, user B can't open it -- and vice versa. How can I set up samba so that all files written to that share can be read, modified, and deleted by all users? Thanks in advance for an answer to this question.
hi, see example but chmod -R 0777 /files/pub on linux before note this maybe a security problem ## Section - [files] [files] readonly = No cscpolicy = disable comment = public files browseable = yes writeable = yes path = /files/pub guestok = yes ----- Original Message ----- From: <AndyLiebman@aol.com> To: <samba@lists.samba.org> Sent: Friday, October 31, 2003 5:20 PM Subject: [Samba] File Permissions> I have set up Samba so that all users on my small network can read from my > one of my Linux shares as well as write to that share. > > However, when user A saves a file to that share, user B can't open it --and> vice versa. How can I set up samba so that all files written to that sharecan> be read, modified, and deleted by all users? > > Thanks in advance for an answer to this question. > -- > To unsubscribe from this list go to the following URL and read the > instructions: http://lists.samba.org/mailman/listinfo/samba >
Apparently Analagous Threads
- PDF printing problem - can't find Samba's file?
- Adobe Photoshop uses wrong permissions when saving, default A CLs and create mask being ignored.
- [PATCH 0/13] ocfs2: xattr bucket API
- [PATCH] ocfs2: Add statistics for the checksum and ecc operations.
- Strange permissions problems