[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Unzipping zip (ear) files created with JAVA / Windows : permission denied on directories

Posted on 2011-05-09
7
Medium Priority
?
894 Views
Last Modified: 2013-12-27
Hello,

I have a little problem :

Under Solaris 10, when i use the unzip command it creates a file tree on wich the permission are rw-r----- even an "umask" before lauching unzip gives "026" so the problem is that i can't move throuh the tree.

My second problem is that it is used in a script (that does not redefine the mask creation of files, i did check) and this script has been delivered to my customer ... It works fine on his server, and workED fine on mine ...

Any suggestion about solving simply the problem ?
0
Comment
Question by:cobol60
  • 4
  • 3
7 Comments
 
LVL 12

Expert Comment

by:upanwar
ID: 35719945
You can change the permission for by executing below given command and then can move the tree.

# chmod -R 755 </tree/path>

You can choose the permission combination whatever you want.

4: read
2: write
1: execute
0
 
LVL 1

Author Comment

by:cobol60
ID: 35721481
The problem is that i can't modify the script wich unzip the file does some sed and zip the result.

On two over servers the script works. The command "chmod -R 751 directory" could have helped me but only if i could change the script. So the really question is why this behaviour

Thank's
0
 
LVL 12

Expert Comment

by:upanwar
ID: 35729129
Could you please check the umask on working server and on the server where script have problem. Could you please share the same.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Author Comment

by:cobol60
ID: 35736168
on the working server, the mask is 026 (the same on the other server with the same user).

To be sure, on the problematic server, i did a "umask 026" before lauching these two commands:

mkdir a_dir
unzip a_zip -d another_dir

the directory a_dir is in rwxr-x--x
but the directory another_dir is in rw-r----- wich behaviour is a bit unattended

The two servers are "iso" in products (the same Solaris 10 installed with the standard parameters from the same "stub" (the same pre-configured media, i don't know if you use this term in english) in file_trees (it's integration and qualification server for the same application) so they have to be very equals.

The strange things is that the script, and so the unzip, worked on the problematic server because we could test it and deliver it to our customer
0
 
LVL 12

Accepted Solution

by:
upanwar earned 2000 total points
ID: 35736497
The only possiblity left is ACL because ACL overwrite the umask so Could you please check the Access control List for the zip file.

# getfacl <your zip file>

Run this command on server where you are facing problem and post the output here.
0
 
LVL 1

Author Comment

by:cobol60
ID: 35736565
I'm not at work today ... But if you are right i would face the problem on both servers with the same zip, is it right ? And i can't be sure 'coz i can't retest but i used the same zip file. Anyway, i will test ACLs tomorrow like you suggested me.

Thank
0
 
LVL 1

Author Comment

by:cobol60
ID: 35736571
I'm not at work today ... But if you are right i would face the problem on both servers with the same zip, is it right ? And i can't be sure 'coz i can't retest but i used the same zip file. Anyway, i will test ACLs tomorrow like you suggested me.

Thank's for the help !
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Suggested Courses

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question