Gnutella Forums

Gnutella Forums (https://www.gnutellaforums.com/)
-   General Discussion (https://www.gnutellaforums.com/general-discussion/)
-   -   [BUG] 2.8.2.92 - wicked file permission dont allow Phex to save configuration (https://www.gnutellaforums.com/general-discussion/52539-bug-2-8-2-92-wicked-file-permission-dont-allow-phex-save-configuration.html)

pawelsz February 2nd, 2006 07:54 PM

[BUG] 2.8.2.92 - wicked file permission dont allow Phex to save configuration
 
Greetings !

Today I have at least upgrade from 2.6.4.89 to 2.8.2.92.
And yes, after while i have find annyoing bug...

Synopsis: wicked file permission dont allow Phex to save configuration

http://my.opera.com/pawelsz/homes/fi...term_after.png

Description: When Phex is write something to sharedlibrary.xml
for first time, it is save it with very wicked unix filepermission "-r-x-wsr--".
There is no "w" flag for user - so Phex cant write to this file anymore - so it
is showing very annyoing popup window:

http://my.opera.com/pawelsz/homes/fi...ibrary.xml.png

How-To-Repeat: Run Phex 2.8.2.92 under unix-like-system and try share / unshare directories few times.
Work-around: Manually chmod'ding sharedlibrary.xml to "644" (-rw-r--r--) very often...
Fix: Phex should write all configuration files with standard "644" (-rw-r--r--) file permissions
insted of totally insane "-r-x-wsr--"...
Phex version: 2.8.2.92
Java version: 1.5.0_02-b09
OS: NetBSD 2.0.2 i386


Sorry for my poor english :rolleyes:

GregorK February 3rd, 2006 12:18 PM

Never heard of that problem before. Actually Phex should use the default file permission settings of the system

Could it be that you have a strange umask value configured?
Can you try to run umask and post the settings... It should usually be something like 022

pawelsz February 4th, 2006 05:10 AM

Quote:

Could it be that you have a strange umask value configured?
Can you try to run umask and post the settings... It should usually be something like 022 [/B]
Code:

Echelon$ umask   
0022

So my umask value is not a problem.

Hmm...

Like i say before - under 2.6.4.89 "i dont have" this problem.
But check this out: :confused:

rm -rf ~/.phex
java -jar /usr/local/phex_2.6.4.89/phex.jar

And look what i get inside of my ~/.phex:
Code:

-r---wS---  1 zafir  users    376 Feb  4 13:28 sharedlibrary.xml
So i think that i have that "wicked file permission problem " since long time,
but i have discover it now thanks to that annyoing windows popup in 2.8.2.92...

:confused:
I have "chmod 777" to sharedlibrary.xml and now Phex have chmod it to:
Code:

----rwsr--  1 zafir  users  37195 Feb  4 13:53
Pretty wicked ! :D

Or maybe this is a Java bug, because when i have upgrade Phex i decide
to install Sun JDK.
So i have "upgrade" my Java from jre1.5.0_05 to jre1.5.0_02-b09
(that version is shipped with "jdk1.5.0_02").

What you think ?

pawelsz February 6th, 2006 12:12 PM

Quote:

Originally posted by pawelsz
Or maybe this is a Java bug
I have remove Java 1.5.0_02-b09 and i have install fresh Java 1.5.0_06-b05.

And I still have the same problem with Phex 2.8.2.92 (Phex 2.6.4.89 is working fine) - so this is not Java bug.

GregorK February 6th, 2006 01:17 PM

Ok, lets try to limit the problem area.

Phex is not touching anything that has something to do with file permissions and also Java has no way of manipulating file permissions for user/group/all separately. Thats why I would look into the direction of a bug in Java, its platform specific implementation or in the platform installation.
Additionally some change between Phex build 89 and build 92 must have caused this bug to appear. Phex changed file handling from using streams to none blocking IO which could be the cause...

I searched a few times through the Java bug database but without finding anything usefull...

Lets look at what Phex is doing...

Phex stores your sharedlibrary into a file called sharedlibrary.xml.tmp and then after its finished it copies the file to sharedlibrary.xml.

As I can see on your screenshot the problem must happen during the copy operation since the sharedlibrary.xml.tmp is still with correct permissions. So what has changed between 89 and 92 with the copy operation... a few lines have changed but unfortunalty it still works the same way as before and most important it still uses the old file stream handling.

So after all I'm stuck again...

pawelsz February 7th, 2006 06:54 AM

Quote:

Originally posted by GregorK
Ok, lets try to limit the problem area.
I have try Phex 2.8.0.91 and its affected with that bug too.

Phex 2.6.4.89 - not affected (it "have" wicked permission problem, but without that annyoing windows)
Phex 2.8.0.91 - affected
Phex 2.8.2.92 - affected

Im sorry GregorK - im not programmer, but if you need some more info or testing with other java / phex versions then i can help you.

In matter of fact - i dont care about that "bug" - i just dont want that annyoing windows ;)

http://my.opera.com/pawelsz/homes/fi...ibrary.xml.png


All times are GMT -7. The time now is 10:30 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 ©2011, Crawlability, Inc.

Copyright © 2020 Gnutella Forums.
All Rights Reserved.