#15 new files are created with execute permission

open
None
5
2009-05-01
2009-04-10
Forest
No

I'm testing a git checkout from yesterday, and I find that smbnetfs sets user-execute permission on newly created files. mount.cifs does not do this.

Discussion

  • Mikhail Kshevetskiy

    It can be changed quite easily, but the effect of this change should be investigated.
    Can you make this trivial change for yourself and check the behavior with Win98/XP/Linux shares at least
    The following combinations should be studied:
    - file work/creation on win 95/98 shares
    - file work/creation on win NT/2000/XP/Vista shares with fat filesystem
    - file work/creation on win NT/2000/XP/Vista shares with ntfs filesystem
    - file work/creation on Linux shares with fat filesystem
    - file work/creation on Linux shares with native linux filesystem like ext2/ext3

     
  • Mikhail Kshevetskiy

    • assigned_to: nobody --> kshevetskiy
     
  • Nobody/Anonymous

    If you show me the trivial change to make, I can try it myself, but I can only test on a linux share with a native linux filesystem. I don't have any windows or fat systems.

     
  • Mikhail Kshevetskiy

    try this patch please

    diff --git a/src/function.c b/src/function.c
    --- a/src/function.c
    +++ b/src/function.c
    @@ -169,7 +169,7 @@ static int function_open(const char *path, struct fuse_file_info *fi){
    DPRINTF(5, "(%s, flags=%o, fh=%llx)\n", path, fi->flags, (long long) fi->fh);
    if (smbitem_what_is(path) != SMBITEM_SMB_SHARE_ITEM) return -EINVAL;

    - if ((fd = samba_open(path, fi->flags, 0777)) == NULL) return -errno;
    + if ((fd = samba_open(path, fi->flags, 0666)) == NULL) return -errno;
    function_store_fd(fi, fd);
    return 0;
    }
    @@ -641,7 +641,7 @@ static int function_truncate(const char *path, off_t size){
    DPRINTF(5, "(%s, %lld)\n", path, (long long) size);
    if (size < 0) return -EINVAL;
    if (smbitem_what_is(path) != SMBITEM_SMB_SHARE_ITEM) return -EINVAL;
    - if ((fd = samba_open(path, O_RDWR, 0777)) == NULL) return -errno;
    + if ((fd = samba_open(path, O_RDWR, 0666)) == NULL) return -errno;
    if (samba_ftruncate(fd, size) != 0){
    int error = errno;
    samba_close(fd);

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks