Termux-app: Is it possible to make work symlinks on mounted internal storage?

Created on 20 Dec 2017  路  7Comments  路  Source: termux/termux-app

I want to make my project directory accessible from termux and other android application (e.g Syncthing). I made symlink from storage to termux home ln -s ~/storage/shared/Projects/MyProject ~/MyProject. It works until I need to make symlink in my project directory (e.g nodejs npm module requires it).

cd ~/MyProject
ln -s test.txt test2.txt
ln: test2.txt: Operation not permitted

Android disallows symlinks in /storage/emulated, but can termux workaround this?

question

Most helpful comment

Maybe can be done with similar termux-setup-storage script method?

Symlinks are not possible under /storage/emulated/0. It is not possible to use features that is not implemented in FS.

If you want symlinks - do this on EXT4 or F2FS file system which is typically /data partition, i.e. $HOME.

termux-setup-storage works in $HOME, so symlinks are possible here.


Note: /storage/emulated/0 is still placed on EXT4, but due to FAT32 emulation via sdcardfs or similar forget about using symlinks here. You cannot bypass Android restrictions without root. You cannot use features that not exist or not implemented.

All 7 comments

Android disallows symlinks in /storage/emulated, but can termux workaround this?

There only one workaround - put your files into Termux home ($HOME), this is limitation of Android.

is my problem too.
i want to create symlink myproject to default-site Apache.

for editing with application Our code editor not editor from termux, ex: micro, nano.

Maybe can be done with similar termux-setup-storage script method?

Maybe can be done with similar termux-setup-storage script method?

Symlinks are not possible under /storage/emulated/0. It is not possible to use features that is not implemented in FS.

If you want symlinks - do this on EXT4 or F2FS file system which is typically /data partition, i.e. $HOME.

termux-setup-storage works in $HOME, so symlinks are possible here.


Note: /storage/emulated/0 is still placed on EXT4, but due to FAT32 emulation via sdcardfs or similar forget about using symlinks here. You cannot bypass Android restrictions without root. You cannot use features that not exist or not implemented.

Some other systems have the same problem. There are sometimes ways around this, such as in nodejs code, making a file that includes the target. If the file is static, and not too large, it is often simply copied.

is my problem too.
i want to create symlink myproject to default-site Apache.

for editing with application Our code editor not editor from termux, ex: micro, nano.

just change the default-site to your project
edit httpd.conf:
/data/data/com.termux/files/usr/etc/apache2/httpd.conf

edit the DocumentRoot option:
DocumentRoot /path/to/your/project

Was this page helpful?
0 / 5 - 0 ratings

Related issues

AnkurJagani picture AnkurJagani  路  3Comments

bitnetwork picture bitnetwork  路  3Comments

Areahints picture Areahints  路  4Comments

TheNickVendetta picture TheNickVendetta  路  4Comments

coreyreichle picture coreyreichle  路  3Comments