Koozali.org: home of the SME Server

File permission and owner whitin files ibay changes

Offline crusader

  • ****
  • 71
  • +0/-0
    • http://www.far-galaxy.de
File permission and owner whitin files ibay changes
« Reply #15 on: August 10, 2007, 01:02:07 AM »
I've searched for oplocks now but how could it be that this option could influence the user changing behaviour of the samba system, especially the fact that only <user>:<usergroup> would be changed and not only <user>:shared ?

Offline pfloor

  • *****
  • 889
  • +1/-0
File permission and owner whitin files ibay changes
« Reply #16 on: August 10, 2007, 02:31:42 AM »
Quote from: "crusader"
I've searched for oplocks now but how could it be that this option could influence the user changing behaviour of the samba system, especially the fact that only <user>:<usergroup> would be changed and not only <user>:shared ?
OpLocks caches the file to the client's local machine and when the client is done, it writes the file back.  If another user requests the same file at the same time then the client is forced to write the file backe before it is finished.  OpLocks  is quite complex and if it doesn't work properly with the types of files you are accessing then it wouldn't surprise me if the client wrote the file back with the wrong user/group/permissions.

Did you try to disable it?  Samba says you should if you are sharing database type files (which you have stated that you do)

A quote from here: http://samba.org/samba/docs/man/Samba-HOWTO-Collection/locking.html

Quote from: "samba.org"
Unless your system supports kernel oplocks, you should disable oplocks if you are accessing the same files from both UNIX/Linux and SMB clients. Regardless, oplocks should always be disabled if you are sharing a database file (e.g., Microsoft Access) between multiple clients, because any break the first client receives will affect synchronization of the entire file (not just the single record), which will result in a noticeable performance impairment and, more likely, problems accessing the database in the first place. Notably, Microsoft Outlook's personal folders (*.pst) react quite badly to oplocks. If in doubt, disable oplocks and tune your system from that point.

OpLocks doesn't always work correctly.  I suggest that you disable oplocks and test again.  It won't hurt anything to disable it as OpLocks is intended to enhance performance.
Code: [Select]
config setprop smb OpLocks disabled
expand-template /etc/samba/smb.conf
/etc/rc7.d/S91smb restart
In life, you must either "Push, Pull or Get out of the way!"

Offline raem

  • *
  • 3,972
  • +4/-0
Re: File permission and owner whitin files ibay changes
« Reply #17 on: August 21, 2007, 12:50:27 PM »
crusader

Just out of interest did you disable oplocks and did that resolve the ownership issues you were having ?

...

Offline mmellon

  • ***
  • 41
  • +0/-0
mount ibay w/ 0775, but all is 0755... Re: File permission and owner files ibay
« Reply #18 on: February 25, 2008, 01:20:57 AM »
wow, i have this same problem, i think.  clean install 7.3.  created users and group w/ users as member.  crewated ibay for the group write, readable by everyone.

i mount the ibay in fstab from ubuntu wit dir&file_mode=0775 but anything copied or created is done so as 755, producing errors in apps like f-spot.

any ideas why this could be?  why can't i create files/folders with perms 775 when mounted as such?

many thanks,

--matt

ps... line from fstab (and if umounted and mounted from ui, same result)

//smeserver/media /mnt/media cifs uid=smematt,gid=smemattsharegroup,user,iocharset=utf8,user=smematt,password=thepassword,file_mode=0775,dir_mode=0775 0 0

Offline mmellon

  • ***
  • 41
  • +0/-0
Re: File permission and owner whitin files ibay changes
« Reply #19 on: February 25, 2008, 04:17:32 AM »
...after a little more pondering, just wanted to add that I saw this mentioned, though not resolved, on nabble.  same behavior -- f-spot, go to import photos with target on a cifs mounted volume on sme (that is, ubuntu desktop running f-spot with photos to be stored on sme ibay mounted with cifs).

The error on any attempt at import is "import error.... access to the path... is denied."  seems that f-spot is creating directories /year/month/day/photo.jpg, but the directories aren't created fast enough?

just tried by adding dirsync into the mount line in fstab, same error.  any ideas?

Thanks!

--matt