cancel
Showing results for 
Search instead for 
Did you mean: 

.Xauthority permissions

 
sreeram n
Frequent Advisor

.Xauthority permissions

Hi Admins,

Is there any way to set a default permission of 644 to .Xauthority file when it created?

I have a Xppplication (with suid ) which is owned by user A and when user B try to run it. It fails with explicit kill or server shutdown.

Problem is that .Xauthority file in the home directory of user B is not readable by user A.

Is there any solution for this problem rather that changing the permission of .Xauthority file manually?

Thanks In advance.
Sreeram
Sreeram N
3 REPLIES
Tingli
Esteemed Contributor

Re: .Xauthority permissions

Can you try "xhost +"?
sreeram n
Frequent Advisor

Re: .Xauthority permissions

I am able to run xclock when I logged in as user B. Problem here is. When I logged in as user B and try to run a program owned by user A, for the time being user B gets the privilege of user A (because set uid which is required to run the program) it is unable to read the .Xauthority file under user Bâ s home directory.

I am looking for a solution how to give a default permission of 644 to .Xauthority file each time it created.
Sreeram N
Matti_Kurkela
Honored Contributor

Re: .Xauthority permissions

Setting 644 permissions to .Xauthority would completely ruin the security it provides.

Instead, take a look at this script I found by Googling a little:

http://www.ilive4unix.net/doku.php/code/sh/xsudo

NOTE: the script apparently has a typo:
xauth merge ${XAUTHEXPORT}|> 2>/dev/dull # import the magic cookie

/dev/dull should probably be /dev/null.

MK
MK