Cannot change ownership of elasticsearch directory in colab
0
votes
0
answers
32
views
I was trying to install elastic search in Google Colab, and it seems that to run the service, you need to change the ownership to a user that is **not root**. I tried the
chown
command for this and then did an ls -l
but don't see the ownership change.
In fact, when I use the verbose option with chown I can see the logs showing the permission change from root:root to daemon:daemon.
!chown -R -v daemon:daemon elasticsearch-8.15.0/
Following is a snippet of the output illustrating the above
changed ownership of 'elasticsearch-8.15.0/lib/elasticsearch-8.15.0.jar' from root:root to daemon:daemon
changed ownership of 'elasticsearch-8.15.0/lib/elasticsearch-preallocate-8.15.0.jar' from root:root to daemon:daemon
changed ownership of 'elasticsearch-8.15.0/lib/elasticsearch-x-content-8.15.0.jar' from root:root to daemon:daemon
changed ownership of 'elasticsearch-8.15.0/lib/elasticsearch-lz4-8.15.0.jar' from root:root to daemon:daemon
changed ownership of 'elasticsearch-8.15.0/lib/elasticsearch-cli-8.15.0.jar' from root:root to daemon:daemon
changed ownership of 'elasticsearch-8.15.0/lib/elasticsearch-simdvec-8.15.0.jar' from root:root to daemon:daemon
changed ownership of 'elasticsearch-8.15.0/lib/elasticsearch-native-8.15.0.jar' from root:root to daemon:daemon
changed ownership of 'elasticsearch-8.15.0/lib/elasticsearch-core-8.15.0.jar' from root:root to daemon:daemon
changed ownership of 'elasticsearch-8.15.0/lib/elasticsearch-logging-8.15.0.jar' from root:root to daemon:daemon
changed ownership of 'elasticsearch-8.15.0/lib/elasticsearch-secure-sm-8.15.0.jar' from root:root to daemon:daemon
changed ownership of 'elasticsearch-8.15.0/lib/elasticsearch-geo-8.15.0.jar' from root:root to daemon:daemon
changed ownership of 'elasticsearch-8.15.0/lib/elasticsearch-plugin-analysis-api-8.15.0.jar' from root:root to daemon:daemon
changed ownership of 'elasticsearch-8.15.0/lib/elasticsearch-plugin-api-8.15.0.jar' from root:root to daemon:daemon
changed ownership of 'elasticsearch-8.15.0/lib/elasticsearch-grok-8.15.0.jar' from root:root to daemon:daemon
changed ownership of 'elasticsearch-8.15.0/lib/elasticsearch-tdigest-8.15.0.jar' from root:root to daemon:daemon
But doing an ls -l
still shows root as the owner and group.
!ls -l elasticsearch-8.15.0/
total 2273
drwx------ 2 root root 4096 Aug 11 13:44 bin
drwx------ 3 root root 4096 Aug 11 13:45 config
drwx------ 8 root root 4096 Aug 5 10:11 jdk
drwx------ 6 root root 4096 Aug 5 10:11 lib
-rwx------ 1 root root 3860 Aug 5 10:04 LICENSE.txt
drwx------ 2 root root 4096 Aug 5 10:07 logs
drwx------ 83 root root 4096 Aug 5 10:12 modules
-rwx------ 1 root root 2285006 Aug 5 10:07 NOTICE.txt
drwx------ 2 root root 4096 Aug 5 10:07 plugins
-rwx------ 1 root root 9111 Aug 5 10:04 README.asciidoc
PS - Since this is a colab question as well as a linux question, I wasn't sure whether to ask this here or on the data science forum(https://datascience.stackexchange.com/questions/tagged/colab) . Please let me know if this is the wrong place.
Asked by CS8867
(1 rep)
Aug 12, 2024, 03:10 PM