🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #8726

Re: Change the directory permissions in Java

#8726
From: Joi Ellis [TeamB]
Date: Fri, 09 Mar 2001 13:59
21 lines
1687 bytes
Torsten Welches <torsten.welches@who.cares.netcologne.de> wrote:

> no, java.io.FilePermission will not change the *OS's* directory 
> permissions, which is what Dillan was looking for. 
> Rather FilePermission controls the VM classes' access to a
> file or directory (SecurityManager).

Bummer!  I skimmed through the JavaDoc and didn't see that distinction.
> AFAIK there is no way to do this with stock-Java. 

In that case, I'd revert to something like:
  Runtime.exec("/bin/chmod --reference=../$dir $dir");

I'm ignoring the obvious need to check the platform OS before attempting it,
of course.

-- 
Joi Ellis (TeamB) 
No direct email, please.
For best results, post on news server newsgroups.borland.com!
Newsgroup Info: http://www.borland.com/newsgroups/guide.html
Technical Details
Message-ID: <98ank5$dab9@bornews.inprise.com>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!sn-xit-03!supernews.com!news-out.usenetserver.com!news-out-sjo.usenetserver.com!newsfeed.direct.ca!look.ca!hub.org!hub.org!PeerFeed.KWeb.on.ca!bornews.borland.com!not-for-mail
References: <989cpp$qer8@bornews.inprise.com> <98akfi$7mk1@bornews.inprise.com> <3aa8db70$1_2@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,e3475c5e57d50c08
X-Google-Attributes: gidf74b3,public
X-Google-ArrivalTime: 2001-03-09 06:07:02 PST
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!sn-xit-03!supernews.com!news-out.usenetserver.com!news-out-sjo.usenetserver.com!newsfeed.direct.ca!look.ca!hub.org!hub.org!PeerFeed.KWeb.on.ca!bornews.borland.com!not-for-mail
From: "Joi Ellis [TeamB]" <joi@aravox.com>
Newsgroups: borland.public.jbuilder.java.language
Subject: Re: Change the directory permissions in Java
Date: 9 Mar 2001 13:59:33 GMT
Organization: Another Netscape Collabra Server User
Lines: 22
Message-ID: <98ank5$dab9@bornews.inprise.com>
References: <989cpp$qer8@bornews.inprise.com>  <98akfi$7mk1@bornews.inprise.com> <3aa8db70$1_2@dnews>
NNTP-Posting-Host: linux.aravox.com
User-Agent: tin/1.4.2-20000205 ("Possession") (UNIX) (Linux/2.2.16-3 (i686))