Page 1 of 2

How to remove "cp: can't stat" errors [Solved]

Posted: 11 Apr 2014, 22:31
by Ed_P
How to I get rid of these errors?

http://imageshack.com/a/img545/1722/1i2l.png

And any idea what caused them?

Re: How to remove "cp: can't stat" errors

Posted: 11 Apr 2014, 22:59
by brokenman
Looks to me like you have a sysvinit script running (startup script) and it has some bad coding.

Re: How to remove "cp: can't stat" errors

Posted: 11 Apr 2014, 23:08
by Ed_P
Thanks brokenman. And where would I look for this sysvinit script? I can assure you I didn't create it.

Re: How to remove "cp: can't stat" errors

Posted: 11 Apr 2014, 23:32
by brokenman
I can say with confidence that you certainly did create the file causing the problem. Whether directly or indirectly is what we need to know. Booting into 'always fresh' will prove this.

I remember you talking about creating scripts to automate some type of cleanup you wanted. Do you still have them in action?
Another possibility is that you are booting into root and going onto websites like freearcade.com to play games in which case you are giving them full access to your computer should they be using any malicious code (perhaps through a flash/java/gtk exploit). That is a long shot but can't be ruled out.

Please post the ouput of:

Code: Select all

find /mnt/sdxY/porteus/rootcopy
cat /etc/rc.d/rc.local
ls -la /etc/rc.d/rc[0-9].d

Re: How to remove "cp: can't stat" errors

Posted: 12 Apr 2014, 01:15
by Ed_P
In Always Fresh mode I got:

Code: Select all

guest@porteus:~$ find /mnt/sda5/porteus/rootcopy
find: `/mnt/sda5/porteus/rootcopy': No such file or directory
guest@porteus:~$ find /mnt/sda5/porteus/changes/rootcopy
find: `/mnt/sda5/porteus/changes/rootcopy': No such file or directory
guest@porteus:~$ mloop  /mnt/sda5/porteus/changes/porteussave.dat
 Please enter root's password below 
Password: 
using /dev/loop6

Please wait while i gather some info ....

 #################################
 Your data file has been mounted at: 
/mnt/loop

You can unmount it by typing uloop

Here is a list of the files:
dev  etc  home	mnt  opt  root	tmp  usr  var

guest@porteus:~$ mloop  /mnt/loop/porteus/changes/porteussave.dat
 Please enter root's password below 
Password: 
using /dev/loop7

##########################
Usage of /opt/porteus-scripts/mloop:
##########################
 mloop /path/to/module.xzm 
 mloop /path/to/file.iso 
 mloop /path/to/file.dat 
 mloop /path/to/file.img 
 mloop /path/to/initrd.xz 
 mloop /path/to/file.tar 
 mloop /path/to/file.tar.gz 
 mloop /path/to/file.tar.bz2 
 mloop http://domain.com/file.iso 

File given will be mounted on a loop at /mnt/loop
You can use uloop to unmout loop.

guest@porteus:~$ find /mnt/loop/porteus/rootcopy
find: `/mnt/loop/porteus': No such file or directory
guest@porteus:~$ find /mnt/loop7/porteus/rootcopy
find: `/mnt/loop7/porteus': No such file or directory
guest@porteus:~$ find /mnt/loop6/porteus/rootcopy
find: `/mnt/loop6/porteus': No such file or directory
guest@porteus:~$ 
In normal changes=EXIT:/porteus/changes/porteussave.dat mode I get:

Code: Select all

guest@porteus:~$ find /mnt/sda5/porteus/rootcopy
find: `/mnt/sda5/porteus/rootcopy': No such file or directory
guest@porteus:~$ find /mnt/sda5/porteus/changes/rootcopy
find: `/mnt/sda5/porteus/changes/rootcopy': No such file or directory
guest@porteus:~$ cat /etc/rc.d/rc.local
#!/bin/sh
#
# /etc/rc.d/rc.local:  Local system initialization script.
#
# Put any local startup commands in here.  Also, if you have
# anything that needs to be run at shutdown time you can
# make an /etc/rc.d/rc.local_shutdown script and put those
# commands in there.

guest@porteus:~$ ls - la /etc/rc.d/rc[0-9].d
/bin/ls: cannot access -: No such file or directory
/bin/ls: cannot access la: No such file or directory
/etc/rc.d/rc0.d:

/etc/rc.d/rc1.d:

/etc/rc.d/rc2.d:

/etc/rc.d/rc3.d:

/etc/rc.d/rc4.d:

/etc/rc.d/rc5.d:

/etc/rc.d/rc6.d:
guest@porteus:~$ ls -la /etc/rc.d/rc[0-9].d
/etc/rc.d/rc0.d:
total 0
drwxr-xr-x  2 root root  3 Sep 23  2008 ./
drwxr-xr-x 11 root root 27 May 12  2013 ../

/etc/rc.d/rc1.d:
total 0
drwxr-xr-x  2 root root  3 Sep 23  2008 ./
drwxr-xr-x 11 root root 27 May 12  2013 ../

/etc/rc.d/rc2.d:
total 0
drwxr-xr-x  2 root root  3 Sep 23  2008 ./
drwxr-xr-x 11 root root 27 May 12  2013 ../

/etc/rc.d/rc3.d:
total 0
drwxr-xr-x  2 root root  3 Sep 23  2008 ./
drwxr-xr-x 11 root root 27 May 12  2013 ../

/etc/rc.d/rc4.d:
total 0
drwxr-xr-x  2 root root  3 Sep 23  2008 ./
drwxr-xr-x 11 root root 27 May 12  2013 ../

/etc/rc.d/rc5.d:
total 0
drwxr-xr-x  2 root root  3 Sep 23  2008 ./
drwxr-xr-x 11 root root 27 May 12  2013 ../

/etc/rc.d/rc6.d:
total 0
drwxr-xr-x  2 root root  3 Sep 23  2008 ./
drwxr-xr-x 11 root root 27 May 12  2013 ../
 

Re: How to remove "cp: can't stat" errors

Posted: 12 Apr 2014, 03:08
by brokenman
You should have a rootcopy directory. That is the first thing I see wrong with your installation.

I remember you talking about creating scripts to automate some type of cleanup you wanted. Do you still have them in action?
You didn't answer this question. I can't think of any script that would want to copy a whiteout file (.wh.xxxxx). The rest of the output is a script trying to run but the script is malformed.

The startup scripts look ok. Perhaps the only other place a startup script could be placed is in your home folder.

Code: Select all

find /etc -type d -name autostart|xargs ls
find /root -type d -name autostart|xargs ls
If you REALLY want to find the offending file run this from a root terminal: (it may take some time as it will check EVERY file for this word)
find / -type f | xargs grep FreeArcade.com.html

Re: How to remove "cp: can't stat" errors

Posted: 12 Apr 2014, 04:07
by Ed_P
brokenman wrote:You should have a rootcopy directory. That is the first thing I see wrong with your installation.
Does booting the ISO impact a rootcopy directory?

Oops, found it. /mnt/live/mnt/isoloop/porteus So let me try those commands again.

Code: Select all

guest@porteus:~$ find /mnt/live/mnt/isoloop/porteus/rootcopy
/mnt/live/mnt/isoloop/porteus/rootcopy
guest@porteus:~$ cat /etc/rc.d/rc.local
#!/bin/sh
#
# /etc/rc.d/rc.local:  Local system initialization script.
#
# Put any local startup commands in here.  Also, if you have
# anything that needs to be run at shutdown time you can
# make an /etc/rc.d/rc.local_shutdown script and put those
# commands in there.

guest@porteus:~$ ls -la /etc/rc.d/rc[0-9].d
/etc/rc.d/rc0.d:
total 0
drwxr-xr-x  2 root root  3 Sep 23  2008 ./
drwxr-xr-x 11 root root 27 May 12  2013 ../

/etc/rc.d/rc1.d:
total 0
drwxr-xr-x  2 root root  3 Sep 23  2008 ./
drwxr-xr-x 11 root root 27 May 12  2013 ../

/etc/rc.d/rc2.d:
total 0
drwxr-xr-x  2 root root  3 Sep 23  2008 ./
drwxr-xr-x 11 root root 27 May 12  2013 ../

/etc/rc.d/rc3.d:
total 0
drwxr-xr-x  2 root root  3 Sep 23  2008 ./
drwxr-xr-x 11 root root 27 May 12  2013 ../

/etc/rc.d/rc4.d:
total 0
drwxr-xr-x  2 root root  3 Sep 23  2008 ./
drwxr-xr-x 11 root root 27 May 12  2013 ../

/etc/rc.d/rc5.d:
total 0
drwxr-xr-x  2 root root  3 Sep 23  2008 ./
drwxr-xr-x 11 root root 27 May 12  2013 ../

/etc/rc.d/rc6.d:
total 0
drwxr-xr-x  2 root root  3 Sep 23  2008 ./
drwxr-xr-x 11 root root 27 May 12  2013 ../
guest@porteus:~$ 

Better?
I remember you talking about creating scripts to automate some type of cleanup you wanted. Do you still have them in action?
You didn't answer this question.
The only cleanup script I am using is the logrotate.sh one that I posted earlier in a different thread.

logrotate.sh

Code: Select all

#!/bin/sh

if [ `whoami` != "root" ]; then
  ktsuss "$0"
  exit
fi

ls -alh /var/log
echo 
logrotate /etc/logrotate.conf
#/usr/sbin/logrotate /etc/logrotate.conf
ls -alh /var/log

read
I manually run it prior to shutting down.
The startup scripts look ok. Perhaps the only other place a startup script could be placed is in your home folder.

Code: Select all

find /etc -type d -name autostart|xargs ls
find /root -type d -name autostart|xargs ls

Code: Select all

guest@porteus:~$ find /etc -type d -name autostart|xargs ls
at-spi-dbus-bus.desktop		razor-globalkeyshortcuts.desktop
gnome-keyring-gpg.desktop	razor-notifications.desktop
gnome-keyring-pkcs11.desktop	razor-panel.desktop
gnome-keyring-secrets.desktop	razor-policykit-agent.desktop
gnome-keyring-ssh.desktop	razor-ptbatterysystemtray-autostart.desktop
gsettings-data-convert.desktop	razor-qlipper-autostart.desktop
gui-autostart.desktop		razor-qstardict-autostart.desktop
nm-applet.desktop		razor-qxkb-autostart.desktop
razor-appswitcher.desktop	razor-runner.desktop
razor-autosuspend.desktop	razor-screenlocker.desktop
razor-desktop.desktop		razor-xscreensaver-autostart.desktop
guest@porteus:~$ find /root -type d -name autostart|xargs ls
find: `/root': Permission denied
AnInitialLog.txt  TouchpadInstall.log	     logrotate.sh	  syslog
Desktop		  TouchpadRunCk.sh	     make.shexecute.sh	  test.sh
Downloads	  asound.conf		     make.shexecute.txt   test1.sh
Fixes.sh	  bookmarks-2014-03-28.json  modules.sh		  test2.sh
Fixes2.1.sh	  boot.log		     savedatspaceused.sh  touchpad.sh
PorteusNotes.txt  bootmode.sh		     suspend.desktop
RestoreGuest.sh   en.dic		     syndaemon.desktop
guest@porteus:~$ su
Password: 
root@porteus:/home/guest# find /root -type d -name autostart|xargs ls
windowmanager.desktop
root@porteus:/home/guest# 
If you REALLY want to find the offending file run this from a root terminal: (it may take some time as it will check EVERY file for this word)
find / -type f | xargs grep FreeArcade.com.html
The results overflow the lxterminal screen's buffers and appears to be meaningless.

Code: Select all

grep: USB: No such file or directory
grep: drive: No such file or directory
grep: files/SanDiskSecureAccess/club_application/Updater/fr/Updater.resources.dll: No such file or directory
grep: /mnt/sda5/Users/Ed/My: No such file or directory
grep: USB: No such file or directory
grep: drive: No such file or directory
grep: files/SanDiskSecureAccess/club_application/Updater/he/Updater.resources.dll: No such file or directory
grep: /mnt/sda5/Users/Ed/My: No such file or directory
grep: USB: No such file or directory
grep: drive: No such file or directory
grep: files/SanDiskSecureAccess/club_application/Updater/it/Updater.resources.dll: No such file or directory
grep: /mnt/sda5/Users/Ed/My: No such file or directory
grep: USB: No such file or directory
grep: drive: No such file or directory
grep: files/SanDiskSecureAccess/club_application/Updater/ja/Updater.resources.dll: No such file or directory
grep: /mnt/sda5/Users/Ed/My: No such file or directory
grep: USB: No such file or directory
grep: drive: No such file or directory
grep: files/SanDiskSecureAccess/club_application/Updater/ko/Updater.resources.dll: No such file or directory
grep: /mnt/sda5/Users/Ed/My: No such file or directory
grep: USB: No such file or directory
grep: drive: No such file or directory
grep: files/SanDiskSecureAccess/club_application/Updater/nl/Updater.resources.dll: No such file or directory
grep: /mnt/sda5/Users/Ed/My: No such file or directory
grep: USB: No such file or directory
grep: drive: No such file or directory
grep: files/SanDiskSecureAccess/club_application/Updater/pl/Updater.resources.dll: No such file or directory
grep: /mnt/sda5/Users/Ed/My: No such file or directory
grep: USB: No such file or directory
grep: drive: No such file or directory
grep: files/SanDiskSecureAccess/club_application/Updater/pt/Updater.resources.dll: No such file or directory
grep: /mnt/sda5/Users/Ed/My: No such file or directory
grep: USB: No such file or directory
grep: drive: No such file or directory
grep: files/SanDiskSecureAccess/club_application/Updater/ru/Updater.resources.dll: No such file or directory
grep: /mnt/sda5/Users/Ed/My: No such file or directory
grep: USB: No such file or directory
grep: drive: No such file or directory
grep: files/SanDiskSecureAccess/club_application/Updater/Updater.exe: No such file or directory
grep: /mnt/sda5/Users/Ed/My: No such file or directory
grep: USB: No such file or directory
grep: drive: No such file or directory
grep: files/SanDiskSecureAccess/club_application/Updater/zh-CN/Updater.resources.dll: No such file or directory
grep: /mnt/sda5/Users/Ed/My: No such file or directory
grep: USB: No such file or directory
grep: drive: No such file or directory
grep: files/SanDiskSecureAccess/club_application/Updater/zh-HK/Updater.resources.dll: No such file or directory
grep: /mnt/sda5/Users/Ed/My: No such file or directory
grep: USB: No such file or directory
grep: drive: No such file or directory
grep: files/SanDiskSecureAccess/club_application/Updater/zh-TW/Updater.resources.dll: No such file or directory
grep: /mnt/sda5/Users/Ed/My: No such file or directory
grep: USB: No such file or directory
grep: drive: No such file or directory
grep: files/SanDiskSecureAccess/club_application/zh-CN/ClubSanDisk.resources.dll: No such file or directory
grep: /mnt/sda5/Users/Ed/My: No such file or directory
grep: USB: No such file or directory
grep: drive: No such file or directory
grep: files/SanDiskSecureAccess/club_application/zh-CN/eula.rtf: No such file or directory
grep: /mnt/sda5/Users/Ed/My: No such file or directory
grep: USB: No such file or directory
grep: drive: No such file or directory
grep: files/SanDiskSecureAccess/club_application/zh-HK/ClubSanDisk.resources.dll: No such file or directory
grep: /mnt/sda5/Users/Ed/My: No such file or directory
grep: USB: No such file or directory
grep: drive: No such file or directory
grep: files/SanDiskSecureAccess/club_application/zh-HK/eula.rtf: No such file or directory
grep: /mnt/sda5/Users/Ed/My: No such file or directory
grep: USB: No such file or directory
grep: drive: No such file or directory
grep: files/SanDiskSecureAccess/club_application/zh-TW/ClubSanDisk.resources.dll: No such file or directory
grep: /mnt/sda5/Users/Ed/My: No such file or directory
grep: USB: No such file or directory
grep: drive: No such file or directory
grep: files/SanDiskSecureAccess/club_application/zh-TW/eula.rtf: No such file or directory
grep: /mnt/sda5/Users/Ed/My: No such file or directory
grep: USB: No such file or directory
grep: drive: No such file or directory
grep: files/SanDiskSecureAccess/My: No such file or directory
grep: Vaults/.backup.dm: No such file or directory
grep: /mnt/sda5/Users/Ed/My: No such file or directory
grep: USB: No such file or directory
grep: drive: No such file or directory
grep: files/SanDiskSecureAccess/My: No such file or directory
grep: Vaults/dmBackup.dll: No such file or directory
grep: /mnt/sda5/Users/Ed/My: No such file or directory
grep: USB: No such file or directory
grep: drive: No such file or directory
grep: files/SanDiskSecureAccess/My: No such file or directory
grep: Vaults/eula.xml: No such file or directory
grep: /mnt/sda5/Users/Ed/My: No such file or directory
grep: USB: No such file or directory
grep: drive: No such file or directory
grep: files/SanDiskSecureAccess/My: No such file or directory
grep: Vaults/My: No such file or directory
grep: Vault/database.db: No such file or directory
grep: /mnt/sda5/Users/Ed/My: No such file or directory
grep: USB: No such file or directory
grep: drive: No such file or directory
grep: files/SanDiskSecureAccess/My: No such file or directory
grep: Vaults/My: No such file or directory
grep: Vault/dmOptions.xml: No such file or directory
grep: /mnt/sda5/Users/Ed/My: No such file or directory
grep: USB: No such file or directory
grep: drive: No such file or directory
grep: files/SanDiskSecureAccess/My: No such file or directory
grep: Vaults/My: No such file or directory
grep: Vault/vaultConfig.ini: No such file or directory
grep: /mnt/sda5/Users/Ed/My: No such file or directory
grep: USB: No such file or directory
grep: drive: No such file or directory
grep: files/SanDiskSecureAccess/OLDRunSanDiskSecureAccess_Win.exe: No such file or directory
grep: /mnt/sda5/Users/Ed/My: No such file or directory
grep: USB: No such file or directory
grep: drive: No such file or directory
grep: files/SanDiskSecureAccess/RunClubSanDisk.exe: No such file or directory
grep: /mnt/sda5/Users/Ed/My: No such file or directory
grep: USB: No such file or directory
grep: drive: No such file or directory
grep: files/SanDiskSecureAccess/RunSanDiskSecureAccess_Win.exe: No such file or directory
grep: /mnt/sda5/Users/Ed/My: No such file or directory
grep: USB: No such file or directory
grep: drive: No such file or directory
grep: files/SanDiskSecureAccess/SanDiskSecureAccess/DownloadSanDiskSecureAccess_Mac.pdf: No such file or directory
grep: /mnt/sda5/Users/Ed/My: No such file or directory
grep: USB: No such file or directory
grep: drive: No such file or directory
grep: files/SanDiskSecureAccess/SanDiskSecureAccess/SanDisk_SecureAccess_QSG.pdf: No such file or directory
grep: /mnt/sda5/Users/Ed/My: No such file or directory
grep: USB: No such file or directory
grep: drive: No such file or directory
grep: files/Splashimages/grub_consplash_xpmgz.cmd: No such file or directory
grep: /mnt/sda5/Users/Ed/My: No such file or directory
grep: USB: No such file or directory
grep: drive: No such file or directory
grep: files/Splashimages/mback.xpm.gz: No such file or directory
grep: /mnt/sda5/Users/Ed/My: No such file or directory
grep: USB: No such file or directory
grep: drive: No such file or directory
grep: files/Splashimages/tux.bmp: No such file or directory
grep: /mnt/sda5/Users/Ed/My: No such file or directory
grep: USB: No such file or directory
grep: drive: No such file or directory
grep: files/Splashimages/tux.new.bmp: No such file or directory
grep: /mnt/sda5/Users/Ed/My: No such file or directory
grep: USB: No such file or directory
grep: drive: No such file or directory
grep: files/Splashimages/tux.new.xpm.gz: No such file or directory
grep: /mnt/sda5/Users/Ed/My: No such file or directory
grep: USB: No such file or directory
grep: drive: No such file or directory
grep: files/Splashimages/tux.xpm: No such file or directory
grep: /mnt/sda5/Users/Ed/My: No such file or directory
grep: USB: No such file or directory
grep: drive: No such file or directory
grep: files/Splashimages/tux.xpm.gz: No such file or directory
grep: /mnt/sda5/Users/Ed/My: No such file or directory
grep: USB: No such file or directory
grep: drive: No such file or directory
grep: files/test.sh: No such file or directory
grep: /mnt/sda5/Users/Ed/My: No such file or directory
grep: USB: No such file or directory
grep: drive: No such file or directory
grep: files/touchpad.sh: No such file or directory
grep: /mnt/sda5/Users/Ed/AppData: No such file or directory
grep: Shortcut.lnk: No such file or directory
grep: /mnt/sda5/Users/Ed/BKUPS: No such file or directory
root@porteus:/home/guest# 

Re: How to remove "cp: can't stat" errors

Posted: 12 Apr 2014, 22:06
by brokenman
OK since I am pretty sure this comes from your changes file try booting into fresh mode and mounting your changes file then running the find command on that.

1) Boot to fresh mode (make sure you have an internet connection)

Code: Select all

mloop /path/to/save.dat
find /mnt/loop -type f | xargs grep FreeArcade.com.html > /tmp/changes-grep.txt
wgetpaste /tmp/changes-grep.txt
That should dump the output of that command to a file which is then uploaded to pastebin. Post the pastebin link here please.

Something to keep in mind for the future. Linux does not like spaces in file names or paths. Windows handles it but linux requires parenthesis around anything with a space and poor coding can lead to troubles with spaces. I know because I am a poor coder. ;)

Re: How to remove "cp: can't stat" errors

Posted: 13 Apr 2014, 04:02
by Ed_P
brokenman wrote:OK since I am pretty sure this comes from your changes file try booting into fresh mode and mounting your changes file then running the find command on that.

1) Boot to fresh mode (make sure you have an internet connection)

Code: Select all

mloop /path/to/save.dat
find /mnt/loop -type f | xargs grep FreeArcade.com.html > /tmp/changes-grep.txt
wgetpaste /tmp/changes-grep.txt
That should dump the output of that command to a file which is then uploaded to pastebin. Post the pastebin link here please.
:shock: Really!! Wasn't aware that capability was built in.
brokenman wrote:Something to keep in mind for the future. Linux does not like spaces in file names or paths.
I have no spaces in any of my Linux/Porteus files names or paths. I do with my Windows system which in on the same hdd as Porteus.
brokenman wrote: I know because I am a poor coder. ;)
Yeah right, I don't buy that at all.

Re: How to remove "cp: can't stat" errors

Posted: 13 Apr 2014, 05:21
by Ed_P
brokenman wrote: 1) Boot to fresh mode (make sure you have an internet connection)

Code: Select all

mloop /path/to/save.dat
find /mnt/loop -type f | xargs grep FreeArcade.com.html > /tmp/changes-grep.txt
wgetpaste /tmp/changes-grep.txt

Code: Select all

guest@porteus:~$ mloop /mnt//sda5/porteus/changes/porteussave.dat Please enter root's password below 
Password: 
using /dev/loop6

Please wait while i gather some info ....



 #################################
 Your data file has been mounted at: 
/mnt/loop

You can unmount it by typing uloop

Here is a list of the files:
dev  etc  home	mnt  opt  root	tmp  usr  var

guest@porteus:~$ find /mnt/loop -type f | xargs grep FreeArcade.com.html > /tmp/changes-grep.txt
find: `/mnt/loop/root': Permission denied
find: `/mnt/loop/var/db/sudo': Permission denied
find: `/mnt/loop/var/cache/ldconfig': Permission denied
find: `/mnt/loop/.wh..wh.plnk': Permission denied
find: `/mnt/loop/.wh..wh.orph': Permission denied
grep: /mnt/loop/etc/NetworkManager/system-connections/emma: Permission denied
grep: /mnt/loop/etc/NetworkManager/system-connections/QuickMoose: Permission denied
grep: /mnt/loop/etc/NetworkManager/system-connections/Cisco02318-guest: Permission denied
grep: /mnt/loop/etc/random-seed: Permission denied
grep: /mnt/loop/home/guest/Downloads/Play: No such file or directory
grep: Bounce: No such file or directory
grep: Out: No such file or directory
grep: For: No such file or directory
grep: Free: No such file or directory
grep: on: No such file or directory
grep: FreeArcade.com_files/st.xhtml: No such file or directory

etc

grep: FreeArcade.com.html: No such file or directory
grep: /mnt/loop/var/log/secure: Permission denied
grep: /mnt/loop/var/log/cron: Permission denied
grep: /mnt/loop/var/log/syslog: Permission denied
grep: /mnt/loop/var/log/debug: Permission denied
grep: /mnt/loop/var/log/messages: Permission denied
grep: /mnt/loop/var/log/messages.1.gz: Permission denied
grep: /mnt/loop/var/log/btmp: Permission denied
grep: /mnt/loop/var/log/btmp.1: Permission denied
grep: /mnt/loop/var/run/slim.auth: Permission denied
guest@porteus:~$ wgetpaste /tmp/changes-grep.txt
Your paste can be seen here: http://bpaste.net/show/202214/
guest@porteus:~$ 

http://bpaste.net/show/202214/



- update -

I have a file and a folder in my /home/guest/Downloads folder that I delete and that reappear everytime I reboot. One is named Play Bounce Out For Free on FreeArcade.com.html. I suspect they are the key to this problem but how do I delete them and have them stay deleted??


- update 2 -

Good news, bad news. Ok, I booted to Always Fresh mode, mlooped the save.dat file, and deleted the two Downloads entities. I rebooted to changes= mode and the Downloads file/folder are now gone. :Yahoo!: Unfortunately the cp errors still showed up when I booted. :wall:

Re: How to remove "cp: can't stat" errors

Posted: 13 Apr 2014, 13:50
by brokenman
One is named Play Bounce Out For Free on FreeArcade.com.html.
Yes this is the one that was causing the problems. Notice it has spaces in the name too!

In the original cp errors (imageshack picture) it was saying:

Can't stat: Bounce
Can't stat: Out
blah blah

So somewhere there is a script wanting to delete things in your downloads folder. This script is malformed. Usually this happens when you cd into a directory and then delete the directory your are in. In any case I would nuke your changes file and start it again. A pain perhaps but the alternative is bandaids on bandaids.

Re: How to remove "cp: can't stat" errors

Posted: 13 Apr 2014, 20:15
by Ed_P
brokenman wrote:
One is named Play Bounce Out For Free on FreeArcade.com.html.
Yes this is the one that was causing the problems. Notice it has spaces in the name too!
Ok. Gotcha. In my defense I didn't create the file directly. FireFox created it, at my request (think long train ride and no Internet). But I deleted it, or at least tried to, on a couple of occasions. But each time I boot it comes back, except for this last time. But according to fanthom deleted files aren't really deleted instead they are made into whiteout files. Not sure where they are stored. And somehow, even though I have deleted the file/folder a whiteout apparently still exists and IT is causing the problem.
So somewhere there is a script wanting to delete things in your downloads folder. This script is malformed. Usually this happens when you cd into a directory and then delete the directory your are in. In any case I would nuke your changes file and start it again. A pain perhaps but the alternative is bandaids on bandaids.
I'm beginning to agree. Fortunately I have the rebuild fairly well documented and scripted.

So, should FireFox save a file with spaces in the name I should rename the file prior to deleting it. Yes?

Re: How to remove "cp: can't stat" errors

Posted: 13 Apr 2014, 23:10
by brokenman
In my defense I didn't create the file directly
Yes I know. That's why I said directly/indirectly in my above post.
So, should FireFox save a file with spaces in the name I should rename the file prior to deleting it. Yes?
Not necessarily. A script that uses a for loop will be a problem if it doesn't use "".

For example:

Code: Select all

for deleteme in /home/guest/download/*; do
  rm $deleteme
done
This would produce errors because it would be trying to do:
rm Play
rm Bounce
rm Out

A better version (with inverted commas) would be:

Code: Select all

for deleteme in "/home/guest/download/*"; do
  rm $deleteme
done
If you plan on accessing a file with spaces in it then i would recommend renaming it to save troubles.

For future reference you should never have any reason to play in: /mnt/live
Deleting the file directly in the live file system (/home/guest for example) should give you the desired result. For the most part, whiteout files do their job correctly.

Re: How to remove "cp: can't stat" errors

Posted: 14 Apr 2014, 05:06
by Ed_P
brokenman wrote:If you plan on accessing a file with spaces in it then i would recommend renaming it to save troubles.

For future reference you should never have any reason to play in: /mnt/live
Deleting the file directly in the live file system (/home/guest for example) should give you the desired result. For the most part, whiteout files do their job correctly.
Can the Porteus code to delete files be tweaked to include quote marks around the file's name to prevent future problems? I can't believe I am the only person who is going to create a file with a space in it's name and then try to delete it. I'm kinda surprised no one has done it before.

Re: How to remove "cp: can't stat" errors

Posted: 14 Apr 2014, 13:20
by brokenman
There is no problem with the current system for removing files.

Code: Select all

guest@porteus:~$ touch "/home/guest/This file has spaces.html"
guest@porteus:~$ rm /home/guest/This*
guest@porteus:~$ 
If you type until 'This' and then hit the TAB key for path completion it will automatically put in backslashes in order to 'escape' the spaces and all will be well. The problem only comes when a 'for' loop is used which the average user probably has no need to write. Only programmers need be concerned with this.

Code: Select all

guest@porteus:~$ touch "/home/guest/This file has spaces.html"
guest@porteus:~$ rm /home/guest/This\ file\ has\ spaces.html 
guest@porteus:~$