LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 07-04-2008, 10:32 PM   #1
mtdew3q
Member
 
Registered: Mar 2006
Location: the next town over from siberia
Distribution: xubuntu
Posts: 481

Rep: Reputation: 18
file permission java deployment linux


hi-

(1) if all my app files in a jar have my user name
and my permission inside the jar what
happens when i deploy the jar to
another users system (download).
the jar itself will also have my regular
account user name.

(2) can you make it so the files have no owner?
or group,i've seen files like that in an archive

(3) or do you just leave it as root:root.
does everyone run a root user and root group?

i dont know anyone that uses linux and only have
my 1 machine. this part i cant test myself.

once i get this piece straight i can go ahead
and hook up the java webstart kind of soon.

thanks for any tips. i tried searching but
i must not be putting in the right keywords.
jim
 
Old 07-04-2008, 10:45 PM   #2
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
There are various implementations of tar (GNU tar, BSD's tar, star) , and they have different behavior.

1) It is the UID that is stored in the tar archive, so user's will see the user name from their own system that corresponds to the stored UID

2) No

3) You can do 0:0 (group 0 on BSD is "wheel"). That is probably most convenient.
 
Old 07-04-2008, 10:47 PM   #3
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
(1) if all my app files in a jar have my user name
and my permission inside the jar what
happens when i deploy the jar to
another users system (download).
the jar itself will also have my regular
account user name.


Think of it like a zip file. When another user unzips the files, it's usually going to be owned by them, not whoever zipped them up. This you can test yourself by creating another user.

(2) can you make it so the files have no owner?
or group,i've seen files like that in an archive


Not that I know of and what would be the advantage of that?

(3) or do you just leave it as root:root.
does everyone run a root user and root group?


Running as root is just bad security. Most people will use sudo or su as root when they need such privileges that only root has.
 
Old 07-04-2008, 11:25 PM   #4
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
Quote:
Originally Posted by trickykid View Post
...When another user unzips the files, it's usually going to be owned by them, not whoever zipped them up. This you can test yourself by creating another user.
Just as an FYI: "usually" is better characterized as depends up tar version, depends on options selected at extract time, depends on archive mode. We shouldn't think of computers as probabilistic; for many, they do seem to have a mind of their own.
 
Old 07-05-2008, 07:31 AM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Just make a test with a random .jar and see that the original
permissions are not visible :

ls -l /media/cdrom/"path-to-apps"/
-r--r--r-- 1 knudfl root 188464 dec 1 2005 Sokuku-en-0.98-beta.jar
(example from Linux Format LXF 76 DVD)

If I unpack to /home/"user", all files are : 'knudfl : knudfl'

Rgds
 
Old 07-05-2008, 08:28 AM   #6
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Quote:
Originally Posted by Mr. C. View Post
Just as an FYI: "usually" is better characterized as depends up tar version, depends on options selected at extract time, depends on archive mode. We shouldn't think of computers as probabilistic; for many, they do seem to have a mind of their own.
But he's not using tar, it's a jar file. I only used zip as a reference since tar and jar's are sort of the same concept.

And computers don't have a mind of their own, we tell them what to do. That's why there's options and also why I mentioned to test it for them self.
 
Old 07-05-2008, 10:43 AM   #7
mtdew3q
Member
 
Registered: Mar 2006
Location: the next town over from siberia
Distribution: xubuntu
Posts: 481

Original Poster
Rep: Reputation: 18
thanks so much for all of this help.

very cool :-)

i am going to try to set up
a new user. that should work. then i can
observe and try out some of the suggestions.

thanks again,
jim
 
Old 07-05-2008, 01:04 PM   #8
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
Oops, my bad. You are correct. I got lost in the noise.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to set permission of a file created by java? emanresu Linux - General 4 01-23-2008 01:54 AM
LXer: Easy Deployment of Real-Time Java for Linux LXer Syndicated Linux News 0 09-07-2006 03:54 AM
Network file deployment. unreal128 Linux - Software 2 09-10-2005 03:58 PM
Tomcat 5.5.7 War file deployment failure r_debussy Linux - Software 4 06-02-2005 02:45 AM
deployment application for Java randomx Programming 1 08-31-2004 01:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration