Any luck running tor-browser as spot? [SOLVED]

Issues and / or general discussion relating to Puppy

Moderator: Forum moderators

Post Reply
User avatar
houndstooth
Posts: 226
Joined: Sun Jul 17, 2022 9:41 am
Location: U.S.A.
Has thanked: 12 times
Been thanked: 17 times

Any luck running tor-browser as spot? [SOLVED]

Post by houndstooth »

I see as an installed app (not standalone), Tor uniquely has its profile directory in a sub-folder. In my case:

/opt/tor/Browser/TorBrowser/Data/Browser/profile.default

If I run-as-spot there's a permissions error.

All permissions are 600 or 700, running from a root# prompt.

[sample]

Code: Select all

-rwx------ 1 root root 314K Jan  1  2000 libsoftokn3.so
-rwx------ 1 root root 372K Jan  1  2000 libssl3.so
-rwx------ 1 root root 119M Jan  1  2000 libxul.so
-rw------- 1 root root  11M Jan  1  2000 omni.ja
-rw------- 1 root root   49 Jan  1  2000 platform.ini
-rwx------ 1 root root 711K Jan  1  2000 plugin-container
-rw------- 1 root root 9.2K Jan  1  2000 precomplete
-rw------- 1 root root    0 Jan  1  2000 removed-files
-rwx------ 1 root root  13K Jan  1  2000 start-tor-browser
-rwx------ 1 root root 1.7K Jan  1  2000 start-tor-browser.desktop
-rw------- 1 root root   83 Jan  1  2000 tbb_version.json
drwx------ 8 root root   80 Sep 30 14:03 TorBrowser
-rwx------ 1 root root 120K Jan  1  2000 updater
-rw------- 1 root root  646 Jan  1  2000 updater.ini
-rw------- 1 root root  138 Jan  1  2000 update-settings.ini
Last edited by houndstooth on Sun Mar 31, 2024 8:57 am, edited 1 time in total.
d-pupp
Posts: 335
Joined: Tue Nov 22, 2022 9:11 pm
Location: Canada
Has thanked: 188 times
Been thanked: 52 times

Re: Any luck running tor-browser as spot?

Post by d-pupp »

If I run-as-spot there's a permissions error.

All permissions are 600 or 700, running from a root# prompt.

Try changing the owner to spot.
The way your permissions are set no one but root has any access.

User avatar
houndstooth
Posts: 226
Joined: Sun Jul 17, 2022 9:41 am
Location: U.S.A.
Has thanked: 12 times
Been thanked: 17 times

Re: Any luck running tor-browser as spot?

Post by houndstooth »

chown is changing ownership, but Tor still won't run as spot with a permissions error.

I first tried to load an .sfs version from user spot.

[blank], woofwoof, & password have no takers.

Qadmin-password.png
Qadmin-password.png (7.61 KiB) Viewed 995 times

Code: Select all

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.

Hold it up to the light --- not a brain in sight!
There's a lot of it about, you know.
Ying Tong Iddle I Po
sudo: 3 incorrect password attempts
d-pupp wrote: Sat Sep 30, 2023 7:32 pm

Try changing the owner to spot.
The way your permissions are set no one but root has any access.

User avatar
mikeslr
Posts: 2961
Joined: Mon Jul 13, 2020 11:08 pm
Has thanked: 178 times
Been thanked: 914 times

Re: Any luck running tor-browser as spot?

Post by mikeslr »

What version of Tor are you referring to? Where did you get it? How did you install it?

per bigpup, "The things you do not tell us, are usually the clue to fixing the problem."

p.s. I just downloaded the latest build of Tor from its website. Essentially, Tor uses firefox, enhancing it. Downloading tar.xz from Tor's website and extracting it creates a portable you can locate anywhere. The package from here, https://www.forum.puppylinux.com/viewto ... 470#p42470 may be needed to provide the included libraries to render sound. And the 'ff' script, placed within the extracted Tor folder will start Tor, albeit as root. However, adding 'run-as-spot' to the ff script's execution line so that it reads:

LD_LIBRARY_PATH=$LAUNCHDIR/:$LAUNCHDIR/extralibs${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} run-as-spot "$LAUNCHDIR/firefox" "$@" -profile "$LAUNCHDIR/profile"

Does result in a permission denied error. That also happens if 'run-as-spot' is at the beginning of that line; and I would think the same would occur were 'run-as-spot' included in the desktop's Exec= line.

Do you actually want to run Tor as spot?

I would guess that the Devs publishing Tor expect it to be run under a multi-user operating system where each user is restricted to his/her own folder and runs as a limited user. Spot is Puppy's method of accomplishing similar isolcation. If the desire is to run Tor as spot, this may be a case where the techniques used with Google-Chrome and Chromium-clones has to be used with a 'mozilla' build. Take a look at how Mikewalsh constructs the Brave-portable, https://www.forum.puppylinux.com/viewtopic.php?t=6150, in particular that within the portable folder is a 'Brave' folder and that Brave is opened with a LAUNCH script reading in pertinent part:

#!/bin/sh
#
# Launcher for 'portable' Brave browser
#
HERE="$(dirname "$(readlink -f "$0")")"
#
mkdir "$HERE/PROFILE" 2> /dev/null
mkdir "$HERE/PROFILE/spot" 2> /dev/null
mkdir "$HERE/PROFILE/spot/Brave-Browser" 2> /dev/null
#
chown -R spot:spot "$HERE/brave"
chown -R spot:spot "$HERE/lib"
chown -R spot:spot "$HERE/PROFILE/spot"
#
...
run-as-spot "$HERE/brave/brave" --user-data-dir=$HERE/PROFILE/spot/Brave-Browser --disk-cache-size=50000000 --media-cache-size=50000000 --allow-outdated-plugins "$@"
fi

If that doesn't work, it may be necessary to employ the older technique: locate the Tor folder within /home/spot with spot permissions. I'll see if I can locate a viable link to the SFSes Mike published on the 'Old' Forum using that technique.

P.P.S., I couldn't find a downloadable SFS that locates a web-browser in /home/spot. But perhaps this post and it's downloadable 'permission changer' may be instructive. viewtopic.php?p=1024&sid=7ddada7092d44e ... a30b#p1024.

User avatar
houndstooth
Posts: 226
Joined: Sun Jul 17, 2022 9:41 am
Location: U.S.A.
Has thanked: 12 times
Been thanked: 17 times

Re: Any luck running tor-browser as spot?

Post by houndstooth »

mikeslr wrote: Sun Oct 01, 2023 3:36 pm

Do you actually want to run Tor as spot?

I actually want to know if it's done by others or reasonable.

In Tor, unlike other browsers, I click on some dicey links precisely BECAUSE I believe it's more secure, that being all the more reason to run as spot.

I am guessing with Tor it is not the profile (config) directory but other components outside the application folder required for it to run. Exactly which media permissions are being blocked?

I can run every other browser as spot & it would be interesting to know why Tor is different, but every idea I have is not something I expect to happen, more a persistent drive, 'I should be able to do this, so why don't I try again.'

From experience it's better to put apps in /root/my-applications instead of /root/spot or /home/spot. One reason is .sfs loaded there do not unload, bringing another persistent question: Are .sfs really loaded if you can unload them & they still exist to still be run? That's an install!

The other reason not to put apps in spot as @bigpup mentioned is simply placing them there does not automatically cause them to run as spot as one might expect.

williwaw
Posts: 1939
Joined: Tue Jul 14, 2020 11:24 pm
Has thanked: 170 times
Been thanked: 368 times

Re: Any luck running tor-browser as spot?

Post by williwaw »

mikeslr wrote: Sun Oct 01, 2023 3:36 pm

"The things you do not tell us, are usually the clue to fixing the problem."

which version of puppy are you running Qadmin in?
Did you install sudo?

d-pupp
Posts: 335
Joined: Tue Nov 22, 2022 9:11 pm
Location: Canada
Has thanked: 188 times
Been thanked: 52 times

Re: Any luck running tor-browser as spot?

Post by d-pupp »

@houndstooth try checking the permission on Tor browser.
If you installed it as root then root would be the owner and the group and spot might not have permissions.

Also if you can find some logs that would help narrow it down. ie. is it folder and file permission or the Tor browser itself that creating the error.

User avatar
mikewalsh
Moderator
Posts: 6156
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 793 times
Been thanked: 1979 times

Re: Any luck running tor-browser as spot?

Post by mikewalsh »

@houndstooth :-

Hm. I think I've got a portable build of Tor kicking around somewhere. Have to track it down, though, 'cos I'm not too sure where it is.

I figured out some generic scripts for running the portable 'zilla-based builds as 'spot' (including Tor) a while back, but again.......I'm really not at all certain quite what I did with them.

Certainly, when running anything as 'spot', you've got to give the application's directory 'spot' permissions, along with its profile/config stuff AND any 'extras' it may need in order to run. But I'm certain I read somewhere that even in a multi-user system, there's something slightly unusual about the way Tor expects to run..?

I'll have to look into this. Leave it with me, and I'll get round to it in the next couple of days.

Mike. ;)

step
Posts: 546
Joined: Thu Aug 13, 2020 9:55 am
Has thanked: 57 times
Been thanked: 198 times
Contact:

Re: Any luck running tor-browser as spot?

Post by step »

Did you try changing the owner and group recursively to spot:spot?
I have the top folder "tor-browser_en-US" with owner:group = spot:spot all the way down to the last file in the tree. It works for me on Fatdog64.
chown -R spot:spot tow-browser_en-US
Then you must run tor-browser as spot. If you run it even once as root it will assign file ownership to root again, and you're back to square one.

User avatar
mikewalsh
Moderator
Posts: 6156
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 793 times
Been thanked: 1979 times

Re: Any luck running tor-browser as spot?

Post by mikewalsh »

Well, I give up on this. It won't run as root, it refuses to run as spot. I tried @step 's method as outlined above, and for me, all it does is to bounce immediately back to the root prompt with zero output to say what's wrong....

I honestly don't know with this one.....except to say that this is one browser I won't waste any further time on, because I've personally never seen any need for it. It's not like I WANT to get it working, because I just don't have any use for it. Sorry, guys.

Mike. Image

User avatar
rockedge
Site Admin
Posts: 6540
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 2748 times
Been thanked: 2620 times
Contact:

Re: Any luck running tor-browser as spot?

Post by rockedge »

I made a Tor SFS some time ago. Version Tor-11.5.7_8.0.sfs which I just loaded it into a F96-CE_4 with the SFS-load utility and it starts right up as user root. One could install it manually.

I notice that in the SFS package I should change the location of the start-tor-browser.desktop file to /root/.local/share/applications

Screenshot(20).jpg
Screenshot(20).jpg (51.21 KiB) Viewed 907 times

Also updated itself to version 12.5.6 easily. But so far quick tests to start it as spot have failed, though I have not changed any ownership and permissions yet in any attempts to start Tor as user spot

Download Tor -> https://rockedge.org/kernels/data/SFS/T ... .7_8.0.sfs
hash -> https://rockedge.org/kernels/data/SFS/T ... fs-md5.txt

User avatar
rockedge
Site Admin
Posts: 6540
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 2748 times
Been thanked: 2620 times
Contact:

Re: Any luck running tor-browser as spot?

Post by rockedge »

I was able to get Tor going as user spot.

First downloaded tor-browser-linux64-12.5.6_ALL.tar.xz, decompressed and extracted the contents and copied to /opt/tor-browser
used chown -R spot:spot /opt/tor-browser to switch ownership to spot.
Tested from the command line (note there is no dash between 'as' and 'spot'):

Code: Select all

run-as spot /opt/tor-browser/firefox
Screenshot(21).jpg
Screenshot(21).jpg (74.23 KiB) Viewed 902 times

Next step is to move /opt/tor-browser to /home/spot/tor-browser

UPDATE: Tor will start in this location with run-as spot but can not connect to the Tor network.....yet

User avatar
houndstooth
Posts: 226
Joined: Sun Jul 17, 2022 9:41 am
Location: U.S.A.
Has thanked: 12 times
Been thanked: 17 times

Re: Any luck running tor-browser as spot?

Post by houndstooth »

rockedge wrote: Mon Oct 02, 2023 3:20 am

UPDATE: Tor will start in this location with run-as spot but can not connect to the Tor network.....yet

That's a beginning. With spot ownership I don't get it to start. Knowing the permissions demands of Tor is knowing why it is requiring root.

User avatar
rockedge
Site Admin
Posts: 6540
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 2748 times
Been thanked: 2620 times
Contact:

Re: Any luck running tor-browser as spot?

Post by rockedge »

@houndstooth I have Tor working now launching as user spot when run as root.

I have 2 separate Tor setups. One is /opt/tor-browser owned by spot.

Screenshot(44).jpg
Screenshot(44).jpg (36.04 KiB) Viewed 591 times

.desktop file is placed in /root/.local/share/applications/start-tor-spot.desktop

Code: Select all

[Desktop Entry]
Type=Application
Name=Tor Browser Setup
GenericName=Web Browser
Comment=Tor Browser  is +1 for privacy and −1 for mass surveillance
Categories=Network;WebBrowser;Security;
Exec=run-as-spot /opt/tor-browser/Browser/start-tor-browser
X-TorBrowser-ExecShell=./Browser/start-tor-browser --detach
Icon=web-browser
StartupWMClass=Tor Browser

The other is /opt/tor launched and owned by root.

Screenshot(43).jpg
Screenshot(43).jpg (35.1 KiB) Viewed 591 times

/root/.local/share/applications/start-tor-browser.desktop

Code: Select all

[Desktop Entry]
Type=Application
Name=Tor Browser Setup
GenericName=Web Browser
Comment=Tor Browser is +1 for privacy and −1 for mass surveillance
Categories=X-Internet-browser;
Exec=/opt/tor/Browser/firefox
X-TorBrowser-ExecShell=./Browser/start-tor-browser --detach
Icon=/opt/tor/Browser/browser/chrome/icons/default/default48.png
StartupWMClass=Tor Browser

Both methods launch Tor which establishes a connection successfully.

Screenshot(42).jpg
Screenshot(42).jpg (33.36 KiB) Viewed 591 times
Post Reply

Return to “Users”