JupyterHub Not allowing to delete non empty directory

I installed JupyterHub with latest version(1.3.0) but when I try to delete the non-empty directory it flashes error with Directory not empty. I also tried changing my jupyterhub_config.py file by setting both True and False to c.FileContentsManager.delete_to_trash , as mentioned here(jupyter/notebook#4916), but it does not work. I also notice when I run the jupyter notebook and try deleting non-empty directory, it works there but I only encounter this when I run jupyterhub and try deleting non-empty directory.
Please let me know if any more information is needed or if there is any change in configuration needed on jupyterhub through which it allows to delete non-empty directory.
I have also opened issue on jupyterhub(JupyterHub Not allowing to delete non empty directory · Issue #3395 · jupyterhub/jupyterhub · GitHub), but was redirected here, please let me know if any other info needed.

JupyterHub sets delete_to_trash to False by default because trash is typically inaccessible in JupyterHub deployments. However, setting it in configuration should take precedence. How exactly are you setting it (in what file, what Spawner, etc.)

1 Like

Thanks for the reponse @minrk , I am setting it in jupyterhub_config.py file and I am using sudospawner.I also tried with all default configurations and default spawner, by setting only delete_to_trash to True and Flase both in jupyter_config.py file, but nothing works to delete the non-empty directory.Please let me know if I am missing any required information.