Page 1 of 2
[SOLVED] Chrome does not let me save where I want
Posted: Sun Aug 07, 2022 6:53 pm
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.
Re: Chrome does not let save where I want
Posted: Sun Aug 07, 2022 7:49 pm
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
Re: Chrome does not let save where I want
Posted: Sun Aug 07, 2022 8:03 pm
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?
Re: Chrome does not let save where I want
Posted: Sun Aug 07, 2022 8:31 pm
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
Re: Chrome does not let save where I want
Posted: Sun Aug 07, 2022 9:01 pm
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.
Re: Chrome does not let save where I want
Posted: Sun Aug 07, 2022 10:39 pm
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?
Re: Chrome does not let save where I want
Posted: Sun Aug 07, 2022 11:43 pm
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
Re: Chrome does not let save where I want
Posted: Mon Aug 08, 2022 2:21 am
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.
Re: Chrome does not let save where I want
Posted: Mon Aug 08, 2022 11:09 am
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.
Re: Chrome does not let save where I want
Posted: Mon Aug 08, 2022 12:53 pm
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
Re: Chrome does not let save where I want
Posted: Mon Aug 08, 2022 3:07 pm
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.
Re: Chrome does not let save where I want
Posted: Mon Aug 08, 2022 3:18 pm
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.
Re: Chrome does not let save where I want
Posted: Mon Aug 08, 2022 4:44 pm
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.
Re: Chrome does not let save where I want
Posted: Mon Aug 08, 2022 4:49 pm
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.
Re: Chrome does not let save where I want
Posted: Mon Aug 08, 2022 4:54 pm
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.
Re: Chrome does not let save where I want
Posted: Mon Aug 08, 2022 5:03 pm
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.
Re: Chrome does not let save where I want
Posted: Mon Aug 08, 2022 5:21 pm
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 27 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
-
Re: Chrome does not let save where I want
Posted: Mon Aug 08, 2022 6:07 pm
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
Re: Chrome does not let save where I want
Posted: Mon Aug 08, 2022 6:31 pm
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.
Re: Chrome does not let save where I want
Posted: Mon Aug 08, 2022 7:32 pm
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.
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.
Re: Chrome does not let save where I want
Posted: Mon Aug 08, 2022 7:44 pm
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.
Re: Chrome does not let save where I want
Posted: Mon Aug 08, 2022 7:55 pm
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.
Re: Chrome does not let save where I want
Posted: Mon Aug 08, 2022 7:59 pm
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.
Re: Chrome does not let save where I want
Posted: Mon Aug 08, 2022 8:14 pm
by wizard
@Amaponian
Does NTFS go well with Linux? No problems with that?
Yes, works without issue.
wizard
Re: Chrome does not let save where I want
Posted: Mon Aug 08, 2022 8:57 pm
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.
Re: Chrome does not let me save where I want
Posted: Mon Aug 08, 2022 9:08 pm
by wizard
@Amaponian
Puppy's scripting language is BASH, try starting here: https://linuxconfig.org/bash-scripting-tutorial
wizard
Re: Chrome does not let me save where I want
Posted: Mon Aug 08, 2022 9:35 pm
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:
Re: Chrome does not let me save where I want
Posted: Mon Aug 08, 2022 9:35 pm
by wizard
Re: Chrome does not let me save where I want
Posted: Mon Aug 08, 2022 9:51 pm
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/
Re: Chrome does not let save where I want
Posted: Mon Aug 08, 2022 11:52 pm
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