Expected Behavior
Creating files with long filenames works identical within PROOT and in the outside world
Outside
$ LEN=255; touch "$(expr substr "$(seq 1 200|tr -d "\n")" 1 $LEN)"; rm -f 12345*
... shows no error
Within PROOT
# LEN=255; touch "$(expr substr "$(seq 1 200|tr -d "\n")" 1 $LEN)"; rm -f 12345*
... should not show an error, too
Actual Behavior
Outside
$ LEN=255; touch "$(expr substr "$(seq 1 200|tr -d "\n")" 1 $LEN)"; rm -f 12345*
$ LEN=256; touch "$(expr substr "$(seq 1 200|tr -d "\n")" 1 $LEN)"; rm -f 12345*
touch: '1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757
In the outside world, I can create files with a name len of 255.
Within PROOT
# LEN=254; touch "$(expr substr "$(seq 1 200|tr -d "\n")" 1 $LEN)"; rm -f 12345*
# LEN=255; touch "$(expr substr "$(seq 1 200|tr -d "\n")" 1 $LEN)"; rm -f 12345*
touch: cannot touch '123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
Within PROOT, I cannot create files with a name len of 255.
Steps to Reproduce the Problem
Extract a root filesystem to a folder, for example ubuntu-22.04 -> jammy
Start proot: proot -S jammy/rootfs/ -w / bash
Create a file: LEN=255; touch "$(expr substr "$(seq 1 200|tr -d "\n")" 1 $LEN)"
Specifications
Proot/Care version: 5.4.0
Kernel version: 5.15.0-130-generic How compile PRoot for aarch64 #140 ~20.04.1-Ubuntu
Host distribution: Ubuntu-20.04
Guest distribution: Ubuntu-22.04
Command Output
# LEN=255; touch "$(expr substr "$(seq 1 200|tr -d "\n")" 1 $LEN)";
touch: cannot touch '123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121': File name too long
Expected Behavior
Creating files with long filenames works identical within PROOT and in the outside world
Outside
... shows no error
Within PROOT
... should not show an error, too
Actual Behavior
Outside
In the outside world, I can create files with a name len of 255.
Within PROOT
Within PROOT, I cannot create files with a name len of 255.
Steps to Reproduce the Problem
proot -S jammy/rootfs/ -w / bashLEN=255; touch "$(expr substr "$(seq 1 200|tr -d "\n")" 1 $LEN)"Specifications
Command Output