Problem with spot and chmoded $HOME

Using applications, configuring, problems
Post Reply
Message
Author
someSven
Posts: 29
Joined: Wed 06 Aug 2014, 10:23

Problem with spot and chmoded $HOME

#1 Post by someSven »

I chmoded my home dir, removed permissions for other users from my files. Now the firefox script of spot isn't running anymore.

sh-4.1# firefox: no permission
sh-4.1# /usr/bin/firefox.bin works, but without the files in spot

when I run 'firefox' (/bin/firefox) while it's still running by using /usr/bin/firefox.bin it starts again with the correct data, but it looks very ugly.

The thing is, chmod on the spot dir has no effect. :?! Thats so strange!

The problem with sh-4.1# firefox is here in this line of the script in /bin/firefox:

Code: Select all

exec su spot -s /bin/sh -c "\"$APP\" $ARGS"
btw: is there a program like diff for user permissions of files? I have a backup, and would like to compare them.


(If your advice is something like reinstalling puppy, please leave me alone. Don't write it down.)

someSven
Posts: 29
Joined: Wed 06 Aug 2014, 10:23

#2 Post by someSven »

Now firefox generally starts again but looks "ugly", sth. is missing. Looks like win95.

User avatar
Semme
Posts: 8399
Joined: Sun 07 Aug 2011, 20:07
Location: World_Hub

#3 Post by Semme »

Pup's NOT multi-user.

All the same, these are the permissions on my *functioning* spot directory >> drwxr-sr-x 8 www-data www-data

Oh, and the "s" you see there is because the group ID bit is set on spot.

Concerning your last post, it sounds like a *theme* access issue.
>>> Living with the immediacy of death helps you sort out your priorities. It helps you live a life less trivial <<<

someSven
Posts: 29
Joined: Wed 06 Aug 2014, 10:23

#4 Post by someSven »

drwx--Sr-x 43 spot spot 4096 Aug 9 08:58 spot
drwx---r-x 6 root root 4096 May 31 00:53 .mozilla

Mine has a big 'S'? Problem?

How can I find out which files firefox needs? There is no info in console when I start it that way, there is no info in /bin/firefox.
Why does it need access to my home folder? spot is accessable, even .mozilla is.

User avatar
Semme
Posts: 8399
Joined: Sun 07 Aug 2011, 20:07
Location: World_Hub

#5 Post by Semme »

What is this.. a frugal or full install? Where'd you get FF from? Version?

What's the output here:

Code: Select all

ls -laR
Among other entries, FF needs access to dbus.
>>> Living with the immediacy of death helps you sort out your priorities. It helps you live a life less trivial <<<

someSven
Posts: 29
Joined: Wed 06 Aug 2014, 10:23

#6 Post by someSven »

Oh it's a frugal install and firefox is from repository.
About ls -laR, there are a lot of files...

Thanks for trying to help, but I think you are going the wrong path. Firefox worked fine before, and 'ls -l' only helps when I know which files in $HOME Firefox needs.

Think im gonna PM the guy who wrote the spot script. My problem is, I havn't learnt bash yet. I don't know how spot works in detail. If all files for firefox are in the spot folder, why isn't it enough to have rwx or rw access for all there?

User avatar
Semme
Posts: 8399
Joined: Sun 07 Aug 2011, 20:07
Location: World_Hub

#7 Post by Semme »

Change the S bit to lower-case >> chmod g+x spot >> http://danielmiessler.com/study/unixlinux_permissions/
>>> Living with the immediacy of death helps you sort out your priorities. It helps you live a life less trivial <<<

someSven
Posts: 29
Joined: Wed 06 Aug 2014, 10:23

#8 Post by someSven »

Ah fine, drwx--srwx 43 spot spot 4096 Aug 9 14:28 spot
Normally I search for stuff on my own. I just wasn't sure if I even need that.

However, it come to mind that all of this should not be relevant cause spot is owned by spot and root can access everything. Alpine works fine with config files like: -rw------- 1 spot spot 23147 Aug 7 23:49 .pinerc


/usr/bin/firefox

Code: Select all

#!/bin/sh
   APP='/usr/bin/firefox.bin'
   #script to run $APP as spot...
ARGS=""
[ $1 ] && while [ "$1" ]; do ARGS="$ARGS \"$1\""; shift; done
if [ $(id -u) -eq 0 ]; then
 [ $XAUTHORITY ] && cp $XAUTHORITY /root/spot/.Xauthority 2>/dev/null
 touch /root/spot/.Xauthority
 #following line is mostly there to catch any root:root files that may have got copied in...
 chown -R spot:spot /root/spot &
 export XAUTHORITY=/root/spot/.Xauthority  
 export XDG_CONFIG_HOME=/root/spot/.config
 export XDG_CACHE_HOME=/root/spot/.cache
 export XDG_DATA_HOME=/root/spot/.local/share
 exec su spot -s /bin/sh -c "\"$APP\" $ARGS"
else #precaution
 exec "$APP" "$ARGS"
fi
Yesterday problems where at this line: exec su spot -s /bin/sh -c "\"$APP\" $ARGS" - no permission error

The full spot script which copys stuff: It's still posted in this form, had it yesterday, but can't find it. Wanted to look at it on my own.

User avatar
Semme
Posts: 8399
Joined: Sun 07 Aug 2011, 20:07
Location: World_Hub

#9 Post by Semme »

Here's what I'd do..

I'd boot live, open "spot" and clk the "eye" atop ROX, then copy all files'n folders into a backup folder on my frugal install.

Then boot back into my frugal install, remove all files inside spot and recopy those from my backup directory back into spot.

Not that odd, but the method works.

Base permissions = rwxr-sr-x 14 spot spot

The 14 represents *linked* items.
>>> Living with the immediacy of death helps you sort out your priorities. It helps you live a life less trivial <<<

someSven
Posts: 29
Joined: Wed 06 Aug 2014, 10:23

#10 Post by someSven »

Yeah, nice idea. Problem is, I didn't change any files inside of spot, except maybe changing permissions. But I could change them again. But I think now this is not the problem at all, cause these files are all owned by spot and root can access everything.

I think firefox needs access to sth. in /root, and I don't wanna try folder by folder or file. I let it be now.

This whole issue isn't so important for me anymore. I'm interested what went wrong, but it's not an emergency anymore, cause my firefox only looks ugly but it works. Thanks for trying to help!

User avatar
Semme
Posts: 8399
Joined: Sun 07 Aug 2011, 20:07
Location: World_Hub

#11 Post by Semme »

Spot's a pseudo-user. For this reason I don't need to know everything.

These permissions however, spot should have:

Code: Select all

drwxr-xr-x  2 spot spot 4096 2013-08-02 10:33 .cache
drwxr-xr-x  2 spot spot 4096 2013-08-02 10:33 .config
drwxr-sr-x  2 spot spot 4096 2013-01-14 08:09 .didiwiki
lrwxrwxrwx  1 spot spot    8 2014-08-09 09:48 .DirIcon -> spot.png
drwxrwxr-x  2 spot spot 4096 2013-07-20 09:02 Downloads
drwxr-xr-x  3 spot spot 4096 2013-06-04 08:58 .local
I'd have to load FF for any new directories to appear.
>>> Living with the immediacy of death helps you sort out your priorities. It helps you live a life less trivial <<<

someSven
Posts: 29
Joined: Wed 06 Aug 2014, 10:23

#12 Post by someSven »

Hi, I never changed the permission of the owner itself.

ls -la /root/spot/
drwxr-sr-x 6 spot spot 4096 Mar 16 15:11 .mozilla
drwx--S--- 3 spot spot 4096 Mar 9 15:42 .dbus
drwx--S--- 2 spot spot 4096 Aug 7 20:14 .gconf
drwx--S--- 3 spot spot 4096 Mar 9 15:42 .gnome2
drwx--S--- 2 spot spot 4096 Mar 9 15:42 .gnome2_private

Group has even more permissions than normal, but spot is the owner and nothing changed. But you pointed me to a possible problem: I have no .gtkrc-2.0 there, and not in spot at all :shock:

EDIT: You changed your posting, so my answer pointed to that before.

User avatar
Semme
Posts: 8399
Joined: Sun 07 Aug 2011, 20:07
Location: World_Hub

#13 Post by Semme »

One last look if you would..

When you said you chmoded your home dir and removed permissions for others, exactly which cmds were used?

Otherwise >> chmod 755 for those with the uppercase S.
>>> Living with the immediacy of death helps you sort out your priorities. It helps you live a life less trivial <<<

someSven
Posts: 29
Joined: Wed 06 Aug 2014, 10:23

#14 Post by someSven »

I only used: chmod o-rwx and chmod g-rwx, and reversed with +
on all files and dirs directly in /root/
I did nothing with 's' or 'S', and nothing with owner permissions.

Peterm321
Posts: 411
Joined: Thu 29 Jan 2009, 14:09
Location: UK

#15 Post by Peterm321 »

Puppy is normally used as root and to run significant programs as user spot may need a fair bit of work.

If you are running as user spot the environment variable $HOME will likely point to a separate directory than the default which is /root, on my system it is /root/spot. Problem is that changing the HOME directory means that the new home directory needs a fair few configuration files, and at least on my system the /root/spot directory there are only a few files in it. Firefox and other applications will be looking for files such as $HOME/.gtkrc-2.0 to adjust its appearance.

I think Barry has written about running as spot and there are some threads and I think some howtos. If indeed /root/spot is spot's HOME directory, and there are only a few files in it, NB try:

Code: Select all

ls  -al  /root/spot 
Then it might be worth a try to copy some of root's config files into it (NB only if the /root/spot doesnt already have its config files many are "hidden" - begin with a dot (.) so will need ls -a or ls -al to see).


Code: Select all

cp   -arn   /root/\.[A-z]*   /root/spot 
chown   -Rh   spot  /root /spot
The recursive copy command copies the files and folders beginning with the dot character (which needs to be escaped with \ as cp uses regular expressions by default) The regular expression copies the files and folders that begin with a dot and one other alphabetic character and avoids copying /root/spot onto itself as well.

The "chown -Rh" command is recursive (goes through the subfolders) to change ownership of all of /root/spot's contents. To efficiently run as user spot all of the files, folders and subfolders in the home directory ideally should be owned by user spot.

I'm not sure exactly how far this post helps, a search of the forum may give better information.

someSven
Posts: 29
Joined: Wed 06 Aug 2014, 10:23

#16 Post by someSven »

Thanks, but I not going to copy all these files. Right now my browser works, one day I'll do some research which files may have something to do with the theme or look of it.

Post Reply