ZFS ACLS and vim


 
Thread Tools Search this Thread
Operating Systems Solaris ZFS ACLS and vim
# 8  
Old 03-20-2015
I'm not sure I understand your explanation of what you've done. Did you try with the LD_PRELOAD set, and found that the ACLs were preserved?

Do you have a complete truss output with "nobackup" set?
This User Gave Thanks to achenle For This Post:
# 9  
Old 03-21-2015
Yes, I run a test with LD_PRELOAD set, so chmod command would not work (and it wasn't working! I tried), that preserved the ACLS when runing vim with backup mode on.

I have attached the dtrace for the run with vim + set nobackup

Code:
# ls -V 1
-rw-r--r--+  1 root     root           9 Mar 21 13:03 1
                user:lp:rwx-----------:fd-----:allow
                 owner@:rw-p--aARWcCos:-------:allow
                 group@:r-----a-R-c--s:-------:allow
              everyone@:r-----a-R-c--s:-------:allow
# cat ~/.vimrc
set nobackup
# truss -f -a -vall -l -d -o truss.out vim 1
# ls -V 1
-rw-r--r--+  1 root     root           9 Mar 21 13:03 1
                user:lp:rwx-----------:fd-----:allow
                 owner@:rw-p--aARWcCos:-------:allow
                 group@:r-----a-R-c--s:-------:allow
              everyone@:r-----a-R-c--s:-------:allow

# 10  
Old 03-22-2015
The bug appears to be at line 4763 of fileio.c in the vim source code from Vim source archives : vim online :

Code:
#ifdef UNIX
    if (made_writable)
        perm &= ~0200;        /* reset 'w' bit for security reasons */
#endif
    if (perm >= 0)        /* set perm. of new file same as old file */
        (void)mch_setperm(wfname, perm);
#ifdef HAVE_ACL
    /* Probably need to set the ACL before changing the user (can't set the
     * ACL on a file the user doesn't own). */
    if (!backup_copy)
        mch_set_acl(wfname, acl);
#endif

The permissions are set on the file, and then ACLs are set, but only if there isn't a backup copy.

Pretty much exactly as you've found out.

The logic there escapes me.
This User Gave Thanks to achenle For This Post:
# 11  
Old 03-30-2015
Thanks for you help with this.

When I have time I will folllow up with the vim guys, I think however that ZFS ACLs are not supported anyway in that vim version (I found some vague comments about it on google).

Thanks again for taking the time to look into this!

Cheers.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. AIX

Unable to set ACLs on sulog - need to grant read permission to a normal user on AIX 6.1

Hi, I need to grant read permission to a normal user on sulog file on AIX 6.1. As root I did acledit sulog and aclget shows "extended permissions" as "enabled" and normal user "splunk" has read permissions. When I try to access sulog as splunk user it won't allow and aclget for splunk user... (6 Replies)
Discussion started by: prvnrk
6 Replies

2. Red Hat

Is there limit on number of ACLs' per directory in Redhat

I work on a distribution application on Linux which generates bulk reference data extract feeds and stores them on a Linux server. I have several consumer applications access the files stored on this Linux server using FTPS protocol. However in order for consumer applications to have access to... (2 Replies)
Discussion started by: waavman
2 Replies

3. Red Hat

ACLs - How can i create new executable files

Hello experts, I would like to know if is possible to create a default acl rule to a directory. in this directory all files created should have executable permissions by the group IT. i tried setfacl -m d:g:it:rwx /files tried to change the mask setfacl -m m::rwx /files but i still... (3 Replies)
Discussion started by: berveglieri
3 Replies

4. UNIX for Advanced & Expert Users

Does regular Linux installation in fact uses any ACLs in any file/dir?

Hi everybody As the title says I wonder if the usual (in my case Ubuntu 14.04 LTS) linux installation root does in fact uses any of the ACLs possible extensions in any of its files/dirs I ask this because I usually use tar to backup the entire root (in offline) with a command like this (root... (2 Replies)
Discussion started by: man-walking
2 Replies

5. Red Hat

Chmod overiding default ACLs.

Afternoon all, This should be a simple task. I have set up default acls on a directory to allow user user1 to read it. This directory is owned by root:root. setfacl -d -m u:user1:rx /directory I also did via the group. This works fine, new files made by root are readable. ... (4 Replies)
Discussion started by: snoop6060
4 Replies

6. Emergency UNIX and Linux Support

Squid acls

Hi guys, There is a line in squid default configuration: # Deny CONNECT to other than secure SSL ports http_access deny CONNECT !SSL_ports acls are applied from top down, so CONNECT acl will deny access to all non SSL and SSL ports. I mean it never reaches the second access rule. (0 Replies)
Discussion started by: majid.merkava
0 Replies

7. Solaris

Very Importan - Vim Settings - Error while opening a File using vim

I downloaded vim.7.2 and compiled the vim source . Added the vim binary path to PATH (Because iam not the root of the box) when i load the file using vim it throws me an error Error detected while processing /home2/e3003091/.vimrc: line 2: E185: Cannot find color scheme darkblue line... (0 Replies)
Discussion started by: girija
0 Replies

8. UNIX for Advanced & Expert Users

changing UGO to ACLs on a file

Hello, I have a directory and a list of files in it on which I'd like to set ACLs and quota. To set ACLs regarding the UGO rights set at the moment, I haven't found any other way than grabbing the UGO rights set on the file with a shell cut command and then applying setfacl commands to that... (2 Replies)
Discussion started by: davchris
2 Replies

9. UNIX and Linux Applications

Help with Vim

How do I use compilers and syntax highlighting in (g)Vim? Specifically, I need a Common Lisp compiler and a C++ compiler. Thanks in advance! (Note: Disregard my other topic.) (1 Reply)
Discussion started by: led3234
1 Replies
Login or Register to Ask a Question