I need convert big xml document to csv file with XmlStarlet. Operation system - Ubuntu 22.04, source file on usb-drive. When I try studying structure of XML document by command
xml el test.xml
I have error "Permission denied".But command
cat test.xml
It works correctly.
permissions:
yrichs@yrichs-Vostro-5490:/media/yrichs/drive/tmp$ llитого 1830320drwxrwxr-x 2 yrichs yrichs 4096 сен 9 20:06 ./drwxrwx--- 10 yrichs yrichs 4096 сен 9 19:39 ../-rw-rw-r-- 1 yrichs yrichs 1874231016 сен 9 19:55 test2.xml-rw-rw-r-- 1 yrichs yrichs 2563 сен 9 13:53 test.xmlyrichs@yrichs-Vostro-5490:/media/yrichs/drive/tmp$ ll /mediaитого 12drwxr-xr-x 3 yrichs yrichs 4096 фев 20 2024 ./drwxr-xr-x 22 root root 4096 сен 6 15:30 ../drwxr-x---+ 3 yrichs yrichs 4096 сен 9 11:04 yrichs/yrichs@yrichs-Vostro-5490:/media/yrichs/drive/tmp$ ll /media/yrichsитого 12drwxr-x---+ 3 yrichs yrichs 4096 сен 9 11:04 ./drwxr-xr-x 3 yrichs yrichs 4096 фев 20 2024 ../drwxrwx--- 10 yrichs yrichs 4096 сен 9 19:39 drive/yrichs@yrichs-Vostro-5490:/media/yrichs/drive/tmp$ llитого 1830320drwxrwxr-x 2 yrichs yrichs 4096 сен 9 20:06 ./drwxrwx--- 10 yrichs yrichs 4096 сен 9 19:39 ../-rw-rw-r-- 1 yrichs yrichs 1874231016 сен 9 19:55 test2.xml-rw-rw-r-- 1 yrichs yrichs 2563 сен 9 13:53 test.xmlyrichs@yrichs-Vostro-5490:/media/yrichs/drive/tmp$ cat test.xml <?xml version="1.0" encoding="utf-8"?><HOUSETYPES><HOUSETYPE ID="1" NAME="Владение" SHORTNAME="влд." DESC="Владение" ISACTIVE="false" UPDATEDATE="1900-01-01" STARTDATE="1900-01-01" ENDDATE="2015-11-05" /></HOUSETYPES>yrichs@yrichs-Vostro-5490:/media/yrichxml sel -T -t -m "//HOUSETYPES/HOUSETYPE" -v "@ID" -o ',' -v "@NAME" -o "," -v "@SHORTNAME" -n test.xml Permission denied: test.xmlPermission denied: test.xmlfailed to load external entity "test.xml"
How to make it work?