Re: [gentoo-user] Re: maim screenshooting

2017-08-03 Thread R0b0t1
On Thu, Aug 3, 2017 at 12:36 AM, Daniel Campbell  wrote:
> On 08/01/2017 10:00 AM, Ian Zimmerman wrote:
>> On 2017-08-01 03:00, Daniel Campbell wrote:
>>
>>> # Add '-s' to interactively set the window to be captured.
>>> screenie() {
>>>  local curdir=$(pwd)
>>>  local shotname=$(date +%Y-%m-%d_%H-%M).png
>>>  echo "5 seconds! Go go go!"
>>>  cd ~/img/screens/comp/
>>>  scrot -d 5 -q 70 "$shotname" ${@}
>>>  echo "Screen taken! Find it under ~/img/screens/comp."
>>>  cd $curdir
>>> }
>>>
>>> (now that I'm looking at it, it could use a spruce up to use pushd/popd
>>> instead of storing the starting dir in a variable...)
>>
>> pushd and popd are bashisms, your current way works with any POSIX shell.
>>
> That's good to know!
>
> I went in search of a few portable shell resources. Some suggest to use
> dash or posh for the testing environment. I also found shellcheck, which
> looks pretty promising (and it's in the tree! Thanks jlec). Do you have
> any experience in portable shell scripting? My web search didn't return
> a whole lot of good resources. Mostly just Stack Overflow and a few
> tutorials which pointed to other resources.
>
> What do you suggest?

Ash, BusyBox's shell, is a good testing environment. Vim's syntax
highlighting will make Bashisms bright red if the shebang line
specifies /bin/sh.



[gentoo-user] vsftpd anonymous upload illegal PORT command

2017-08-03 Thread Walter Dnes
  I'm trying to upload files from an OS/2 VM in machine A to anononymous
upload on another machine on my home LAN.  I'm using the allegedly "very
simple" ftpd and getting nowhere, and Google isn't helping.  To simplify
things, I built vsftpd without ssl, and iptables is off on both
machines.  I don't think it's related to PASV, because the ancient ftp
client on the OS/2 VM doesn't understand the "ftp -p" option.  My
/etc/vsftpd/vsftpd.conf file is...

listen=YES
local_enable=NO
anonymous_enable=YES
anon_upload_enable=YES
write_enable=YES
anon_mkdir_write_enable=YES
anon_root=/home/ftp
pasv_enable=YES
pasv_min_port=3
pasv_max_port=30100
port_enable=YES
allow_writeable_chroot=YES

  I successfully log in as user "anonymous", password "anonymous",
execute "bin".  When I try uploading a file, I get the 500 PORT error.
Anybody have a working config?  Or another simpler ftpd server?

-- 
Walter Dnes 
I don't run "desktop environments"; I run useful applications



Re: [gentoo-user] vsftpd anonymous upload illegal PORT command

2017-08-03 Thread Jeriko One


On 08/03/2017 05:13 AM, Walter Dnes wrote:
>   I'm trying to upload files from an OS/2 VM in machine A to anononymous
> upload on another machine on my home LAN.  I'm using the allegedly "very
> simple" ftpd and getting nowhere, and Google isn't helping.  To simplify
> things, I built vsftpd without ssl, and iptables is off on both
> machines.  I don't think it's related to PASV, because the ancient ftp
> client on the OS/2 VM doesn't understand the "ftp -p" option.  My
> /etc/vsftpd/vsftpd.conf file is...
> 
> listen=YES
> local_enable=NO
> anonymous_enable=YES
> anon_upload_enable=YES
> write_enable=YES
> anon_mkdir_write_enable=YES
> anon_root=/home/ftp
> pasv_enable=YES
> pasv_min_port=3
> pasv_max_port=30100
> port_enable=YES
> allow_writeable_chroot=YES
> 
>   I successfully log in as user "anonymous", password "anonymous",
> execute "bin".  When I try uploading a file, I get the 500 PORT error.
> Anybody have a working config?  Or another simpler ftpd server?
> 

Are you able to upload files from other machines than this particular
VM? I don't have any problems uploading using your config.

Who owns /home/ftp? I think by default vsftpd will change the owner to
root which would cause problems.



Re: [gentoo-user] vsftpd anonymous upload illegal PORT command

2017-08-03 Thread Mick
On Thursday 03 Aug 2017 08:13:18 Walter Dnes wrote:
>   I'm trying to upload files from an OS/2 VM in machine A to anononymous
> upload on another machine on my home LAN.  I'm using the allegedly "very
> simple" ftpd and getting nowhere, and Google isn't helping.  To simplify
> things, I built vsftpd without ssl, and iptables is off on both
> machines.  I don't think it's related to PASV, because the ancient ftp
> client on the OS/2 VM doesn't understand the "ftp -p" option.  My
> /etc/vsftpd/vsftpd.conf file is...
> 
> listen=YES
> local_enable=NO
> anonymous_enable=YES
> anon_upload_enable=YES
> write_enable=YES
> anon_mkdir_write_enable=YES
> anon_root=/home/ftp

Is this writeable?

> pasv_enable=YES
> pasv_min_port=3
> pasv_max_port=30100
> port_enable=YES
> allow_writeable_chroot=YES
> 
>   I successfully log in as user "anonymous", password "anonymous",
> execute "bin".  When I try uploading a file, I get the 500 PORT error.
> Anybody have a working config?  Or another simpler ftpd server?

For these kind of jobs I tend to default to netcat (nc) or socat in listening 
mode, because of its simplicity.  However, I am not familiar with OS/2 to know 
what it comes with.  If it has busybox or you can install it there you can use 
busybox nc and/or busybox ftpd.

In answering your question, I think the error you are getting is related to 
the client not using a passive connection type.  Can you enable passive 
*after* it connects?

ftp> passive
ls

Alternatives are the busybox ftpd service or tftp, both of which are 
relatively easy to run.

-- 
Regards,
Mick

signature.asc
Description: This is a digitally signed message part.


[gentoo-user] Re: maim screenshooting

2017-08-03 Thread Ian Zimmerman
On 2017-08-02 22:36, Daniel Campbell wrote:

> I went in search of a few portable shell resources. Some suggest to
> use dash or posh for the testing environment. I also found shellcheck,
> which looks pretty promising (and it's in the tree! Thanks jlec). Do
> you have any experience in portable shell scripting? My web search
> didn't return a whole lot of good resources. Mostly just Stack
> Overflow and a few tutorials which pointed to other resources.

My server still runs debian, and now my Pi does as well, and all my
scripts have to run there, so yes, I have some experience.

The Turtle Book (Classic Shell Scripting by Robbins and Beebe) is pretty
good at explaining the differences between the various implementations.
OTOH it also contains some (IMO) dubious recommendations which have
unfortunately become conventional wisdom.

-- 
Please don't Cc: me privately on mailing lists and Usenet,
if you also post the followup to the list or newsgroup.
Do obvious transformation on domain to reply privately _only_ on Usenet.



[gentoo-user] Wanting gcc-avr...getting trouble... :)

2017-08-03 Thread tuxic
Hi,

I want a avr toolchain.
>From here
https://wiki.gentoo.org/wiki/Arduino
I took instructions but already
the first step fail:

emerge -pvv cross-avr/gcc cross-avr/binutils cross-avr/avr-libc

# emerge -pvv cross-avr/gcc cross-avr/binutils cross-avr/avr-libc

These are the packages that would be merged, in order:

Calculating dependencies... done!

emerge: there are no ebuilds to satisfy "cross-avr/gcc".

emerge: searching for similar names...
emerge: Maybe you meant sys-devel/gcc?
[1]10605 exit 1 emerge -pvv cross-avr/gcc cross-avr/binutils 
cross-avr/avr-libc


Where can I find valid instructions?

Cheers
Meino






Re: [gentoo-user] vsftpd anonymous upload illegal PORT command

2017-08-03 Thread Walter Dnes
On Thu, Aug 03, 2017 at 07:50:32AM -0700, Jeriko One wrote

> Are you able to upload files from other machines than this particular
> VM? I don't have any problems uploading using your config.

  It fails uploading a test file from the linux machine hosting the VM.

> Who owns /home/ftp? I think by default vsftpd will change the owner
> to root which would cause problems.

  I get more verbose error messages with the linux ftp client.  On the h

[i3][root][/dev/shm] ftp 192.168.123.251
Connected to 192.168.123.251 (192.168.123.251).
220 (vsFTPd 3.0.2)
Name (192.168.123.251:waltdnes): anonymous
530 Please login with USER and PASS.
SSL not available
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> put hello.txt
local: hello.txt remote: hello.txt
200 PORT command successful. Consider using PASV.
553 Could not create file.
ftp> bye
221 Goodbye.

  This was with the upload dir on 192.168.123.251 with permissions 555
[d531][root][~] ll /home/ftp/
total 8
dr-xr-xr-x 2 ftp  ftp  4096 Aug  3 06:41 .
drwxr-xr-x 6 root root 4096 Aug  3 06:41 ..

  If I change permissions on /home/ftp to 666, I get...

[i3][root][/dev/shm] ftp 192.168.123.251
Connected to 192.168.123.251 (192.168.123.251).
220 (vsFTPd 3.0.2)
Name (192.168.123.251:waltdnes): anonymous
530 Please login with USER and PASS.
SSL not available
331 Please specify the password.
Password:
500 OOPS: vsftpd: refusing to run with writable root inside chroot()
Login failed.
ftp> bye

  How is this supposed to work anyways?  Can't write to upload dir if
it's not writable, but vsftpd refuses to run if the upload dir is
writeable.  Help.

-- 
Walter Dnes 
I don't run "desktop environments"; I run useful applications



Re: [gentoo-user] vsftpd anonymous upload illegal PORT command

2017-08-03 Thread Mick
On Thursday 03 Aug 2017 15:02:51 Walter Dnes wrote:
> On Thu, Aug 03, 2017 at 07:50:32AM -0700, Jeriko One wrote
> 
> > Are you able to upload files from other machines than this particular
> > VM? I don't have any problems uploading using your config.
> 
>   It fails uploading a test file from the linux machine hosting the VM.
> 
> > Who owns /home/ftp? I think by default vsftpd will change the owner
> > to root which would cause problems.
> 
>   I get more verbose error messages with the linux ftp client.  On the h
> 
> [i3][root][/dev/shm] ftp 192.168.123.251
> Connected to 192.168.123.251 (192.168.123.251).
> 220 (vsFTPd 3.0.2)
> Name (192.168.123.251:waltdnes): anonymous
> 530 Please login with USER and PASS.
> SSL not available
> 331 Please specify the password.
> Password:
> 230 Login successful.
> Remote system type is UNIX.
> Using binary mode to transfer files.
> ftp> put hello.txt
> local: hello.txt remote: hello.txt
> 200 PORT command successful. Consider using PASV.
> 553 Could not create file.
> ftp> bye
> 221 Goodbye.
> 
>   This was with the upload dir on 192.168.123.251 with permissions 555
> [d531][root][~] ll /home/ftp/
> total 8
> dr-xr-xr-x 2 ftp  ftp  4096 Aug  3 06:41 .
> drwxr-xr-x 6 root root 4096 Aug  3 06:41 ..

It could not create file because your ftp user:group do not have write 
permission.


>   If I change permissions on /home/ftp to 666, I get...
> 
> [i3][root][/dev/shm] ftp 192.168.123.251
> Connected to 192.168.123.251 (192.168.123.251).
> 220 (vsFTPd 3.0.2)
> Name (192.168.123.251:waltdnes): anonymous
> 530 Please login with USER and PASS.
> SSL not available
> 331 Please specify the password.
> Password:
> 500 OOPS: vsftpd: refusing to run with writable root inside chroot()
> Login failed.
> ftp> bye
> 
>   How is this supposed to work anyways?  Can't write to upload dir if
> it's not writable, but vsftpd refuses to run if the upload dir is
> writeable.  Help.

According to the man page here:

 https://security.appspot.com/vsftpd/vsftpd_conf.html

" ... the anonymous ftp user must have write permission on desired upload 
locations."

You may want to try setting

file_open_mode=0777

in your vsftpd.conf and check ftp user or group have write permissions within 
the /home/ftp/ directory.

-- 
Regards,
Mick

signature.asc
Description: This is a digitally signed message part.


[gentoo-user] Gnutls / Google Chrome

2017-08-03 Thread siefke_lis...@web.de
Hello,

I have updated gnutls v. 3.5.13 and after rebuild google-chrome want not
started. 

Okay link check

sisibox lib64 # ldd /opt/google/chrome/chrome | grep gnu
libstdc++.so.6 => /usr/lib/gcc/x86_64-pc-linux-gnu/6.3.0/libstdc++.so.6 
(0x7fd05e7db000)
libgcc_s.so.1 => /usr/lib/gcc/x86_64-pc-linux-gnu/6.3.0/libgcc_s.so.1 
(0x7fd05e5c4000)
libgnutls.so.28 => not found

So Gnutls missed, I reinstall chrome and become same. I understand not
why because on my package Server:

(amd64) ks3374456 www-client # ldd /opt/google/chrome/chrome | grep gnu
libstdc++.so.6 => /usr/lib/gcc/x86_64-pc-linux-gnu/6.3.0/libstdc++.so.6 
(0x7f339c499000)
libgcc_s.so.1 => /usr/lib/gcc/x86_64-pc-linux-gnu/6.3.0/libgcc_s.so.1 
(0x7f339c282000)
libgnutls.so.30 => /usr/lib64/libgnutls.so.30 (0x7f3399ac9000)

all work. I have deinstall and install, I have use "Source" and Binary
Package. What can do now?

Thank you for help
Silvio


pgpWi0QnQp92j.pgp
Description: PGP signature


Re: [gentoo-user] Wanting gcc-avr...getting trouble... :)

2017-08-03 Thread R0b0t1
On Thu, Aug 3, 2017 at 12:54 PM,   wrote:
> Hi,
>
> I want a avr toolchain.
> From here
> https://wiki.gentoo.org/wiki/Arduino
> I took instructions but already
> the first step fail:
>
> emerge -pvv cross-avr/gcc cross-avr/binutils cross-avr/avr-libc
>

Try using crossdev:
https://wiki.gentoo.org/wiki/Arduino#Install_the_toolchain_using_crossdev.
Later on that page is a link to instructions for using the Debian
binary release, if you want to do that.



Re: [gentoo-user] vsftpd anonymous upload illegal PORT command

2017-08-03 Thread Bruce Schultz


On August 4, 2017 5:25:57 AM GMT+10:00, Mick  wrote:
>On Thursday 03 Aug 2017 15:02:51 Walter Dnes wrote:
>> On Thu, Aug 03, 2017 at 07:50:32AM -0700, Jeriko One wrote
>> 
>> > Are you able to upload files from other machines than this
>particular
>> > VM? I don't have any problems uploading using your config.
>> 
>>   It fails uploading a test file from the linux machine hosting the
>VM.
>> 
>> > Who owns /home/ftp? I think by default vsftpd will change the owner
>> > to root which would cause problems.
>> 
>>   I get more verbose error messages with the linux ftp client.  On
>the h
>> 
>> [i3][root][/dev/shm] ftp 192.168.123.251
>> Connected to 192.168.123.251 (192.168.123.251).
>> 220 (vsFTPd 3.0.2)
>> Name (192.168.123.251:waltdnes): anonymous
>> 530 Please login with USER and PASS.
>> SSL not available
>> 331 Please specify the password.
>> Password:
>> 230 Login successful.
>> Remote system type is UNIX.
>> Using binary mode to transfer files.
>> ftp> put hello.txt
>> local: hello.txt remote: hello.txt
>> 200 PORT command successful. Consider using PASV.
>> 553 Could not create file.
>> ftp> bye
>> 221 Goodbye.
>> 
>>   This was with the upload dir on 192.168.123.251 with permissions
>555
>> [d531][root][~] ll /home/ftp/
>> total 8
>> dr-xr-xr-x 2 ftp  ftp  4096 Aug  3 06:41 .
>> drwxr-xr-x 6 root root 4096 Aug  3 06:41 ..
>
>It could not create file because your ftp user:group do not have write 
>permission.
>
>
>>   If I change permissions on /home/ftp to 666, I get...

What about 777 for /home/ftp ?

Directories generally need the 'x' set

>> 
>> [i3][root][/dev/shm] ftp 192.168.123.251
>> Connected to 192.168.123.251 (192.168.123.251).
>> 220 (vsFTPd 3.0.2)
>> Name (192.168.123.251:waltdnes): anonymous
>> 530 Please login with USER and PASS.
>> SSL not available
>> 331 Please specify the password.
>> Password:
>> 500 OOPS: vsftpd: refusing to run with writable root inside chroot()
>> Login failed.
>> ftp> bye
>> 
>>   How is this supposed to work anyways?  Can't write to upload dir if
>> it's not writable, but vsftpd refuses to run if the upload dir is
>> writeable.  Help.
>
>According to the man page here:
>
> https://security.appspot.com/vsftpd/vsftpd_conf.html
>
>" ... the anonymous ftp user must have write permission on desired
>upload 
>locations."
>
>You may want to try setting
>
>file_open_mode=0777
>
>in your vsftpd.conf and check ftp user or group have write permissions
>within 
>the /home/ftp/ directory.

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.



Re: [gentoo-user] Re: maim screenshooting

2017-08-03 Thread Peter Humphrey
On Thursday 03 Aug 2017 10:17:03 Ian Zimmerman wrote:

> The Turtle Book (Classic Shell Scripting by Robbins and Beebe) is pretty
> good at explaining the differences between the various implementations.
> OTOH it also contains some (IMO) dubious recommendations which have
> unfortunately become conventional wisdom.

Would you like to expand on that?

-- 
Regards
Peter




Re: [gentoo-user] vsftpd anonymous upload illegal PORT command

2017-08-03 Thread Walter Dnes
On Thu, Aug 03, 2017 at 04:09:15PM +0100, Mick wrote
> On Thursday 03 Aug 2017 08:13:18 Walter Dnes wrote:

> > anon_root=/home/ftp
> 
> Is this writeable?

  If I do make it writeable, I get...

500 OOPS: vsftpd: refusing to run with writable root inside chroot()

  Damned if I do; damned if I don't.

> For these kind of jobs I tend to default to netcat (nc) or socat
> in listening mode, because of its simplicity.  However, I am not
> familiar with OS/2 to know what it comes with.  If it has busybox or
> you can install it there you can use busybox nc and/or busybox ftpd.

  I'm trying to transfer a turn-based video game (Galactic Civilizations
2.5) from an OS/2 Warp 3.5 VM to modern, but backwards-compatible
ArcaOS5 https://www.arcanoae.com/arcaos/  atftpd seems to be the answer.
Both the old OS/2 and the new ArcaOS5 have a tftp client.  I've got both 
of them talking with atftpd on my Gentoo desktop, and it's transferring
data as I type.

  Having said that, I really want to get an ftp server working, as a
matter of principle.  Please post your vsftpd.conf, and the output of
"ls -al /home/ftp" to give me an idea of what I'm doing wrong.

-- 
Walter Dnes 
I don't run "desktop environments"; I run useful applications



[gentoo-user] Re: maim screenshooting

2017-08-03 Thread Ian Zimmerman
On 2017-08-03 23:16, Peter Humphrey wrote:

> > The Turtle Book (Classic Shell Scripting by Robbins and Beebe) is
> > pretty good at explaining the differences between the various
> > implementations.  OTOH it also contains some (IMO) dubious
> > recommendations which have unfortunately become conventional wisdom.
> 
> Would you like to expand on that?

Not really :-) But ok, the top two are xargs and read (when reading
streams, that is, not when prompting interactively, that's what read is
for).

-- 
Please don't Cc: me privately on mailing lists and Usenet,
if you also post the followup to the list or newsgroup.
Do obvious transformation on domain to reply privately _only_ on Usenet.