[SOLVED] Chrome does not let me save where I want

Issues and / or general discussion relating to Puppy

Moderator: Forum moderators

Amaponian
Posts: 83
Joined: Wed Dec 15, 2021 12:10 am
Has thanked: 73 times
Been thanked: 3 times

[SOLVED] Chrome does not let me save where I want

Post by Amaponian »

For me, and for now, a final solution is here.
I let chrome save where he wants and a startup script moves it to where I want.

I want to keep my Puppy drive as clean as possible, saving all things in another drive (a data drive), which I expect to use also with Ubuntu and Windows.

I want Chrome to save all files in my data drive, but it only let my save them in the spot folder.

Is there a way to do what I want?

I'm using Bionicpup64/frugal.

Last edited by Amaponian on Wed Aug 10, 2022 1:04 pm, edited 4 times in total.
step
Posts: 546
Joined: Thu Aug 13, 2020 9:55 am
Has thanked: 57 times
Been thanked: 198 times
Contact:

Re: Chrome does not let save where I want

Post by step »

Most likely you are running chrome as user spot therefore chrome can only save to the folders that spot owns. You have two possibilities:
- change the owner of the download folder to spot instead of root <<< I do this
- run chrome as root (not recommended for security concerns).

Check also this section https://forum.puppylinux.com/viewforum.php?f=159

Amaponian
Posts: 83
Joined: Wed Dec 15, 2021 12:10 am
Has thanked: 73 times
Been thanked: 3 times

Re: Chrome does not let save where I want

Post by Amaponian »

step wrote: Sun Aug 07, 2022 7:49 pm

- change the owner of the download folder to spot instead of root <<< I do this

How do I do that?

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

Re: Chrome does not let save where I want

Post by williwaw »

open a rox window showing the new download folder.
right click on the folder > dir > properties and a dialog should open showing the owner and group as root,root

back in your rox window left click somewhere in the window and enter ~
a terminal window should open

chown -R spot:spot the-folder-name

check again with the dialog , and you should see spot for both owner and group

many tutorials on line for changing owners will show the sudo command in use. puppy does not use sudo

Amaponian
Posts: 83
Joined: Wed Dec 15, 2021 12:10 am
Has thanked: 73 times
Been thanked: 3 times

Re: Chrome does not let save where I want

Post by Amaponian »

williwaw wrote: Sun Aug 07, 2022 8:31 pm

open a rox window showing the new download folder.
right click on the folder > dir > properties and a dialog should open showing the owner and group as root,root

back in your rox window left click somewhere in the window and enter ~
a terminal window should open

chown -R spot:spot the-folder-name

check again with the dialog , and you should see spot for both owner and group

many tutorials on line for changing owners will show the sudo command in use. puppy does not use sudo

Didn't work, root:root remains. It's a fat32 drive, may be that's whay the command fails. It doesn't report any error though.
Thank you anyway.

Let me search on internet.

Edited:
The command worked in the Puppy drive, so I still don't know what to do, it doesn't work where I need.

Re-Edited
I created a "Downloads" folder in the Puppy drive, applied the chow command (spot:spot) there and it worked like a charm. I moved the folder to the other drive and the ownership went back to root:root. I true mistery, I think I need a magician.

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

Re: Chrome does not let save where I want

Post by williwaw »

lol, you moved the goal posts! perhaps someone has a workaround. but I would consider a linux partition on the data drive. what kind of partition is ubuntu installed on?

User avatar
wizard
Posts: 1973
Joined: Sun Aug 09, 2020 7:50 pm
Has thanked: 2635 times
Been thanked: 685 times

Re: Chrome does not let save where I want

Post by wizard »

You can't make @step method work on a fat32 partition because fat32 does not recognize Linux permissions. The only way I know to do what you want with fat32 would be to have a script that moved everything out of spot to your target directory. You could have it run on startup, set it to run on timed intervals or run it manually.

wizard

Big pile of OLD computers

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

Re: Chrome does not let save where I want

Post by mikeslr »

I don't have the time just now to get into a full exposition. But the MikeWalsh's Spot2Root utility may be just what you need. Discussion and Links from here, viewtopic.php?p=55087#p55087. What it does (among other things) is move files downloaded into /root/spot/downloads or /home/spot/downloads to /root/downloads, changing permissions of the file being moved from Spot to Root. A launcher is placed on the Taskbar to initiate the application.
You may have to edit the paths, i.e., from the location of /spot in the pet as written to the location of /spot on your system. And you may not need to have permissions changed. But as the downloaded file ends up with root permissions that part of the pet shouldn't matter.

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

Re: Chrome does not let save where I want

Post by step »

@Amaponian, fyi fat32 doesn't support file ownership (whose this file?), file access masks (who can read/write/execute this file?), file links (file name aliases), and files larger than 4GB. You can change fat32 to another, more capable, format (this process is called "partitioning") BUT in so doing you will lose all data currently on the disk.

User avatar
wizard
Posts: 1973
Joined: Sun Aug 09, 2020 7:50 pm
Has thanked: 2635 times
Been thanked: 685 times

Re: Chrome does not let save where I want

Post by wizard »

@mikeslr

Good call on Spot2Root, your memory is better than mine. The link you posted really didn't go to the files. I think this is a more direct link:
https://drive.google.com/drive/folders/ ... 4vCp2rVBqX

wizard

Big pile of OLD computers

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

Re: Chrome does not let save where I want

Post by mikewalsh »

@wizard / @mikeslr / all :-

I really ought to give Spot2Root its own thread here on the new Forum. The only thread extant is over on the old Forum, which always entails having to use one of the Puppy search engines to locate it.

I have made a number of modifications and improvements with the current version - we're up to v4.3 ATM - including a help file, and a direct link/shortcut to the spot directory, along with a simpler way to get files into spot for uploading. I run a number of browsers from a Fossapup chroot when I'm in Barry's old Quirky64 April 701 - my daily driver! - so it's necessary for me, especially with Chrome, Brave and Ungoogled Chromium all running-as-spot these days.....this will still work on a sym-link to the chroot's Downloads directory.

(It was my first-ever 'home-grown' Puppy utility, so.....I'll create a thread for this, I think.)

Mike. ;)

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

Re: Chrome does not let save where I want

Post by mikeslr »

Should have mentioned at as the Spot2Root utility installs into your SaveFile it shouldn't matter how the drive/partition holding the SaveFile is formatted. A SaveFile is a block of storage formatted as Linux. That's why you can use it with Fat32 and ntfs partitions.

And, of course, the initial download into /spot/downloads is in RAM. FWIW, I usually edit the destination where Spot2Root transfer the file to /mnt/home/SOMEWHERE. Anything 'hanging' from /mnt/ is outside of your Puppy's file-system so does not occupy RAM.

Amaponian
Posts: 83
Joined: Wed Dec 15, 2021 12:10 am
Has thanked: 73 times
Been thanked: 3 times

Re: Chrome does not let save where I want

Post by Amaponian »

williwaw wrote: Sun Aug 07, 2022 10:39 pm

lol, you moved the goal posts! perhaps someone has a workaround. but I would consider a linux partition on the data drive. what kind of partition is ubuntu installed on?

ubuntu is installed in a ext4 partition. ext4 partition is not recognized by Windows so I cannot use it to put there a common data.

Amaponian
Posts: 83
Joined: Wed Dec 15, 2021 12:10 am
Has thanked: 73 times
Been thanked: 3 times

Re: Chrome does not let save where I want

Post by Amaponian »

wizard wrote: Sun Aug 07, 2022 11:43 pm

The only way I know to do what you want with fat32 would be to have a script that moved everything out of spot to your target directory. You could have it run on startup, set it to run on timed intervals or run it manually.
wizard

I think that's the best solution to what I want. I was just thinking about that. I think that would be quite a simple script, but I don't know about scripts in Puppy Linux so I have to find out.

Thank you.

Amaponian
Posts: 83
Joined: Wed Dec 15, 2021 12:10 am
Has thanked: 73 times
Been thanked: 3 times

Re: Chrome does not let save where I want

Post by Amaponian »

mikeslr wrote: Mon Aug 08, 2022 2:21 am

I don't have the time just now to get into a full exposition. But the MikeWalsh's Spot2Root utility may be just what you need. Discussion and Links from here, viewtopic.php?p=55087#p55087. What it does (among other things) is move files downloaded into /root/spot/downloads or /home/spot/downloads to /root/downloads, changing permissions of the file being moved from Spot to Root. A launcher is placed on the Taskbar to initiate the application.
You may have to edit the paths, i.e., from the location of /spot in the pet as written to the location of /spot on your system. And you may not need to have permissions changed. But as the downloaded file ends up with root permissions that part of the pet shouldn't matter.

Sounds promissing but, since the solution of this is a very simple script, I'm planning to build it myself. I just have to do some research on how to write those scripts. I've seen a few examples of that coding.

Thank you.

Amaponian
Posts: 83
Joined: Wed Dec 15, 2021 12:10 am
Has thanked: 73 times
Been thanked: 3 times

Re: Chrome does not let save where I want

Post by Amaponian »

step wrote: Mon Aug 08, 2022 11:09 am

@Amaponian, fyi fat32 doesn't support file ownership (whose this file?), file access masks (who can read/write/execute this file?), file links (file name aliases), and files larger than 4GB. You can change fat32 to another, more capable, format (this process is called "partitioning") BUT in so doing you will lose all data currently on the disk.

Thanks for the explanation, very useful. When chosing fat32 I thought that would be the best option for it to be recognized by all operating systems.

User avatar
wizard
Posts: 1973
Joined: Sun Aug 09, 2020 7:50 pm
Has thanked: 2635 times
Been thanked: 685 times

Re: Chrome does not let save where I want

Post by wizard »

@mikeslr

OP wrote:

I want Chrome to save all files in my data drive,

His data drive is fat32 (wants access by both Linux & MS Win), Spot2Root will get files out of Spot, but he is still faced with moving the files to the data drive.

@Amaponian
Here's a script you may be able to use.

Conditions:
-Set Chrome's download location = /root/spot/Downloads
-Target directory must be mounted at startup
--open: pmount
--click: arrow on left of target drive
--click: Mount partition at boot

-Download move-spot.sh and copy to /root/my-applications/bin/move-spot.sh

move-spot.sh.gz
Remove fake .gz before using
(708 Bytes) Downloaded 26 times

-Open move-spot.sh in geany and type in the full path of the target directory in line 9
-Click: save

Next step will run move-spot.sh when you boot Puppy
-put a symlink to /root/my-applications/bin/move-spot.sh in /root/Startup

You can also run move-spot.sh manually at any time.

If you have questions about any of the instructions message back.

wizard
-

Big pile of OLD computers

User avatar
wizard
Posts: 1973
Joined: Sun Aug 09, 2020 7:50 pm
Has thanked: 2635 times
Been thanked: 685 times

Re: Chrome does not let save where I want

Post by wizard »

@Amaponian

When chosing fat32 I thought that would be the best option for it to be recognized by all operating systems.

You could also use NTFS, but the "spot" problem would be the same.

wizard

Big pile of OLD computers

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

Re: Chrome does not let save where I want

Post by step »

Amaponian wrote: Mon Aug 08, 2022 5:03 pm
step wrote: Mon Aug 08, 2022 11:09 am

@Amaponian, fyi fat32 doesn't support file ownership (whose this file?), file access masks (who can read/write/execute this file?), file links (file name aliases), and files larger than 4GB. You can change fat32 to another, more capable, format (this process is called "partitioning") BUT in so doing you will lose all data currently on the disk.

Thanks for the explanation, very useful. When chosing fat32 I thought that would be the best option for it to be recognized by all operating systems.

It is the best choice, if you can live with the limitations I mentioned. If your fat32 drive is only used for downloads, and you don't mind that other users of your PC (if any) will be able to read your downloads, then the 4GB file size limit is the only one that really matters: large 4K movies, very large ISO files will fail downloading mid way thorough the download.
Fat32 is native to Linux, Windows and Mac OS.

All other limitations being equal, exFAT increases maximum file size to 16GB. exFAT is native to Linux (if gparted lists exFAT as a partition format choice), Windows and Mac OS (the drive must be formatted in Mac OS).

NTFS, as @wizard mentioned, removes all the limitations I mentioned. It's native to Linux (gparted caveat above for NTFS applies), Windows but not to Mac OS. Mac OS can only read NTFS provided that the NTFS driver is installed, which isn't by default.

Amaponian
Posts: 83
Joined: Wed Dec 15, 2021 12:10 am
Has thanked: 73 times
Been thanked: 3 times

Re: Chrome does not let save where I want

Post by Amaponian »

wizard wrote: Mon Aug 08, 2022 5:21 pm

@mikeslr

OP wrote:

I want Chrome to save all files in my data drive,

His data drive is fat32 (wants access by both Linux & MS Win), Spot2Root will get files out of Spot, but he is still faced with moving the files to the data drive.

@Amaponian
Here's a script you may be able to use.

Conditions:
-Set Chrome's download location = /root/spot/Downloads
-Target directory must be mounted at startup
--open: pmount
--click: arrow on left of target drive
--click: Mount partition at boot

-Download move-spot.sh and copy to /root/my-applications/bin/move-spot.sh
move-spot.sh.gz
that
-Open move-spot.sh in geany and type in the full path of the target directory in line 9
-Click: save

Next step will run move-spot.sh when you boot Puppy
-put a symlink to /root/my-applications/bin/move-spot.sh in /root/Startup

You can also run move-spot.sh manually at any time.

If you have questions about any of the instructions message back.

wizard
-

I tested it and it works like a charm, it's magic, I want to learn that, I want to learn how to write this kind of scripts.

Here's two screens showing the before and the after running the script.

Image

Image

The file is moved and the permissions are updated. Simply a miracle. Not the solution I expected but, for me and for now, this a final solution.

Thank you very much Mr. @wizard.

Amaponian
Posts: 83
Joined: Wed Dec 15, 2021 12:10 am
Has thanked: 73 times
Been thanked: 3 times

Re: Chrome does not let save where I want

Post by Amaponian »

recomendation

wizard wrote: Mon Aug 08, 2022 6:07 pm

@Amaponian

When chosing fat32 I thought that would be the best option for it to be recognized by all operating systems.

You could also use NTFS, but the "spot" problem would be the same.

wizard

Really?
Does NTFS go well with Linux? No problems with that?
Using NTSF would solve another problem I haven't said: Windows is totally blind with ext4 partitions, but many Linux users could prefer that. I also prefer that, but once it happened to me that Windows reported a partition as unallocated space and I formatted it... (big mistake).

So I think I'm going to take the NTSF recommendation but just for the common drive.

Thanks Mr. @wizard for all your help and wonderful recomendations.

Amaponian
Posts: 83
Joined: Wed Dec 15, 2021 12:10 am
Has thanked: 73 times
Been thanked: 3 times

Re: Chrome does not let save where I want

Post by Amaponian »

step wrote: Mon Aug 08, 2022 6:31 pm

then the 4GB file size limit is the only one that really matters: large 4K movies, very large ISO files will fail downloading mid way thorough the download.

I do have a problem with that, I think I'm gonna change to NTFS, taking the recommendation of Mr. @wizard.

Thanks for your useful help.

Burunduk
Posts: 251
Joined: Thu Jun 16, 2022 6:16 pm
Has thanked: 7 times
Been thanked: 127 times

Re: Chrome does not let save where I want

Post by Burunduk »

Another possible solution is to mount a drive in a way that allows the user spot to write to it. But this makes the whole drive accessible to spot.

  • Use the blkid or lsblk -f command to find out the drive UUID (a label also can be used instead of UUID).

  • Unmount the drive if it's already mounted

  • Create a directory where you want your drive to be mounted. (For example, mkdir /mnt/my-drive)

  • Run mount -o rw,uid=spot,gid=spot -t vfat UUID=xxxx-xxxx /mnt/my-drive to mount the drive. (Replace UUID=xxxx-xxxx with an actual id or use LABEL=my_data) After this any file or directory in the drive will "belong" to spot:spot (until you unmount it)

  • The drive can be unmounted in a usual way by clicking the corner of its desktop icon.

You could put the command into a script:

Code: Select all

#!/bin/bash

drive_id=xxxx-xxxx
mount_dir=/mnt/my-data-drive

mkdir -p "$mount_dir"

mount -o rw,uid=spot,gid=spot -t vfat UUID="$drive_id" "$mount_dir"

or add a /etc/fstab entry.

User avatar
wizard
Posts: 1973
Joined: Sun Aug 09, 2020 7:50 pm
Has thanked: 2635 times
Been thanked: 685 times

Re: Chrome does not let save where I want

Post by wizard »

@Amaponian

Does NTFS go well with Linux? No problems with that?

Yes, works without issue.

wizard

Big pile of OLD computers

Amaponian
Posts: 83
Joined: Wed Dec 15, 2021 12:10 am
Has thanked: 73 times
Been thanked: 3 times

Re: Chrome does not let save where I want

Post by Amaponian »

wizard wrote: Mon Aug 08, 2022 5:21 pm

Here's a script you may be able to use.

Conditions:
-Set Chrome's download location = /root/spot/Downloads
-Target directory must be mounted at startup
--open: pmount
--click: arrow on left of target drive
--click: Mount partition at boot

-Download move-spot.sh and copy to /root/my-applications/bin/move-spot.sh
move-spot.sh.gz

I noticed that the script, without warning, overwrites files with the same name. I would prefer it leaves those files in the origin and pops up a warning, but that would really complicate the code. I think I can do that. Could you, please, provide a link to learn how to write this kind of code? Thank you.

User avatar
wizard
Posts: 1973
Joined: Sun Aug 09, 2020 7:50 pm
Has thanked: 2635 times
Been thanked: 685 times

Re: Chrome does not let me save where I want

Post by wizard »

@Amaponian

Puppy's scripting language is BASH, try starting here: https://linuxconfig.org/bash-scripting-tutorial

wizard

Big pile of OLD computers

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

Re: Chrome does not let me save where I want

Post by williwaw »

Amaponian wrote: Mon Aug 08, 2022 8:57 pm

I noticed that the script, without warning, overwrites files with the same name. I would prefer it leaves those files in the origin and pops up a warning, but that would really complicate the code. I think I can do that. Could you, please, provide a link to learn how to write this kind of code? Thank you.

not to complicated at all, in fact most all you need is already in the script and just needs to be repurposed and adjusted. :thumbup:

User avatar
wizard
Posts: 1973
Joined: Sun Aug 09, 2020 7:50 pm
Has thanked: 2635 times
Been thanked: 685 times

Re: Chrome does not let me save where I want

Post by wizard »

@Amaponian

Here's another BASH tutorial: https://www.w3schools.io/terminal/bash-tutorials/

wizard

Big pile of OLD computers

williams2
Posts: 1062
Joined: Sat Jul 25, 2020 5:45 pm
Been thanked: 305 times

Re: Chrome does not let me save where I want

Post by williams2 »

noticed that the script, without warning, overwrites files with the same name. I would prefer it leaves those files in the origin and pops up a warning, but that would really complicate the code.

Many CLI (command line interface) programs can display help. For example, type in a terminal:

cp --help
and rsync --help

There is some documentation in /usr/share/doc

And you can read the man pages. you can search (duckduckgo. google etc ...)
For example, cp manpage and rsync manpage

And you can read the manual for that application,. for example: https://www.gnu.org/software/bash/manual/

And you can search for learn bash

https://www.bashoneliners.com/oneliners/popular/
https://onceupon.github.io/Bash-Oneliner/

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

Re: Chrome does not let save where I want

Post by williwaw »

Amaponian wrote: Mon Aug 08, 2022 4:44 pm

ubuntu is installed in a ext4 partition. ext4 partition is not recognized by Windows so I cannot use it to put there a common data.

another way around could be to try something here https://itsubuntu.com/mount-linux-partitions-windows/

I would be inclined to use something like this only if the files were to be accessed by windows read only. some more research would be prudent before giving windows write access

Post Reply

Return to “Users”