title: zip command globbing folder while zipping with sudo
body: <p>I am trying to run a zip command as user1:</p>
  
  <pre><code>[user1@host ~]$ sudo zip -P 68SqkCtNAxUpVoX8KPm /tmp/metazip /mnt/blumeta0/db2/ssl_keystore/sl_keystore/* /home/user2/sqllib/sqlrsdir/* /home/user2/sqllib/profile.env /home/user2/sqllib/db2systm /home/user2/db2/keystore/*
          zip warning: name not matched: /home/user2/db2/keystore/*        
  updating: mnt/blumeta0/db2/ssl_keystore/bludb_ssl.crl (stored 0%)
  updating: mnt/blumeta0/db2/ssl_keystore/bludb_ssl.kdb (deflated 69%)
  updating: mnt/blumeta0/db2/ssl_keystore/bludb_ssl.rdb (deflated 1%)
  updating: mnt/blumeta0/db2/ssl_keystore/bludb_ssl.sth (stored 0%)
  updating: home/user2/sqllib/sqlrsdir/sqlrsbak (deflated 94%)
  updating: home/user2/sqllib/sqlrsdir/sqlrsdir (deflated 94%)
  updating: home/user2/sqllib/profile.env (deflated 34%)
  updating: home/user2/sqllib/db2systm (deflated 98%)
  </code></pre>
  
  <p>As you can see <code>/home/user2/db2/keystore/</code> is not being zipped because user1 does not have permissions to access that folder</p>
  
  <pre><code>[user1@host ~]$ ls -l /home/user2/db2/keystore/
  ls: cannot open directory /home/user2/db2/keystore/: Permission denied
  </code></pre>
  
  <p>current permissions on /home/user2/db2/keystore is:</p>
  
  <pre><code>[root@host /]# ls -l /home/user2/db2/keystore/
  total 12
  -rw------- 1 user2 db2iadm1 6846 Oct 21 17:30 keystore.p12
  -rw------- 1 user2 db2iadm1  193 Oct 21 15:11 keystore.sth
  [root@host /]# ls -l /home/user2/db2/
  total 4
  drwx------ 2 user2 db2iadm1 6144 Oct 21 15:11 keystore
  </code></pre>
  
  <p>If I change the permissions of these files and folders to </p>
  
  <pre><code>[root@host /]# ls -l /home/user2/db2/keystore/
  total 12
  -rw-r----- 1 user2 db2iadm1 6846 Oct 21 17:30 keystore.p12
  -rw-r----- 1 user2 db2iadm1  193 Oct 21 15:11 keystore.sth
  [root@host /]# ls -l /home/user2/db2/
  total 4
  drwxr----- 2 user2 db2iadm1 6144 Oct 21 15:11 keystore
  </code></pre>
  
  <p>I am able to zip. But sudo (root) has permissions to access the files and folders so zip with sudo should have been able to zip these. Assuming globing I tried <code>\</code> to skip <code>*</code> and also <code>''</code> to overcome the issue but still unable to zip that folder. Any clue what is missing here?</p>