I want to allow user to download some files using Luci web user interface of my openWrt linux .
I have uploaded my files in /etc and /tmp folders of openWrt.
But i dont know how can i give a url of this uploaded files to user .
Can any one help me ? Thanks in advance
The easiest way is to create a symlink to this file in /www directory. For example, to download /etc/passwd file
ln -s /etc/passwd /www/test
Then, in your web browser, go to 192.168.1.1/test to download the file.
Related
On my Ubuntu 18.04 server I have created a FTP user (named ftphtm3) for which I want to restrict access to folder /var/www/html3
Here is what I have done so far:
created a FTP directory /var/ftp/ftphtm3 and bound it to /var/www/html3, mount --bind /var/www/html3 /var/ftp/ftphtm3
changed user's home directory: usermod -d /var/ftp/ftphtm3/ ftphtm3
in /etc/vsftpd.conf: chroot_local_user=YES, chroot_list_enable=YES
But then, when with filezilla as user ftphtm3, I land in /var/ftp/ftphtml3 BUT I can still go back to neighbours or parent directories (in fact I have access to all my server).
Do you have any idea what I have missed ?
Thank you
p.s: the steps for "restricting" the access come from this post but I would like if possible to avoid binding directories. I just ftphtm3 to land in /var/www/html3 and to only have access on it. That's it.
I am new to docker and was working through the docker book and just got to the building a Sinatra web application part. But the link provided to download the source code doesn't exist. I tried using the GitHub link for the code but that isn't working as well. I need to make a binary executable as the next step and I am unable to do so.
$ cd sinatra
$ wget --cut-dirs=3 -nH -r -e robots=off --reject="index.html","
Dockerfile" --no-parent http://dockerbook.com/code/5/sinatra/ webapp/
This is what I am supposed to do but if you copy paste the link into your browser, it doesn't work. I also tried making each folder I needed and physically making files but in the next step which is chmod +x webapp/bin/webapp, it says that the directory does not exist even though it does.
How do I install and enable my custom theme in OpenEdx's docker based DevStack?
I use comprehensive theming
I use docker on Linux
The LMS and CMS read many configuration settings from the container filesystem in the following locations:
/edx/app/edxapp/cms.env.json
/edx/app/edxapp/cms.auth.json
Since you are using docker DevStack, shell into LMS, CMS to find those files.
shell into LMS
make lms-shell
Shell into CMS
make studio-shell
You can create this directory at any location on a file system that is accessible to your Open edX installation. For example, you might place it at the root of the file system in a directory named /my-open-edx-themes.
Set the file permissions on the themes directory, and all of its subdirectories, to enable read+write permissions for the Ubuntu user.
sudo chown -R edxapp:edxapp /my-open-edx-themes
sudo chmod -R u+rw /my-open-edx-themes
For each Open edX component that you want to theme, set the
"ENABLE_COMPREHENSIVE_THEMING" = True
"DEFAULT_SITE_THEME": "Your-theme-name "
For LMS,
/edx/app/edxapp/lms.env.json
For Studio,
/edx/app/edxapp/cms.env.json
For the E-commerce,
/edx/etc/ecommerce.yml
And for each Open edX component that you want to apply a theme to, add the absolute path of the themes directory to the
COMPREHENSIVE_THEME_DIRS
configuration property.
For LMS and Studio,
"COMPREHENSIVE_THEME_DIRS": [
"/my-open-edx-themes/edx-platform"
]
For the E-commerce,
COMPREHENSIVE_THEME_DIRS: ["/my-open-edx-themes/ecommerce"]
Finally, Restart all servers.
For more info, please follow this documentation.
http://edx.readthedocs.io/projects/edx-installing-configuring-and-running/en/latest/configuration/changing_appearance/theming/enable_themes.html
Add comments if you have any additional questions.
I have setup an installation of Bitnami Wordpress Multisite in google cloud. I have also setup the SSH, and I am able to connect through SSH, but I want to go to the wordpress installation and edit files / upload plugins / edit permissions. Any idea of how I am able to do that. I followed bitnami's guide but it still does not allow me.
The cloud image of Bitnami WordPress Multisite is already configured with the right permissions to allow you install or upload plugins, edit any file, etc using the WordPress administration panel.
However, if you are using an old version of WordPress you may find some permissions problems. If it is your case, you can try the following workaround:
Open /opt/bitnami/apps/wordpress/htdocs/wp-config.php
Look for define('FS_METHOD', 'ftptext');
Replace it with define('FS_METHOD', 'direct');
Change the permissions of /opt/bitnami/apps/wordpress/htdocs to allow the server user (daemon) to make the modifications. You can do that by executing sudo chown -R daemon /opt/bitnami/apps/wordpress/htdocs
Go to the WordPress admin panel and check you can perform the operation you want.
Hope it helps.
For security reasons, WordPress files are not editable from the
WordPress application itself. We would suggest using an FTP client to
edit the files remotely.
Another option is to change the permissions to be able to edit from
the WordPress application temporarily. Note that this configuration is
not secure so please revert it after editing the files temporarily:
sudo chown daemon:daemon /opt/bitnami/apps/wordpress/htdocs/
Afterwards revert the changes to stay secure..
For /wp-content folder
sudo chown -R bitnami:daemon /opt/bitnami/apps/wordpress/htdocs/wp-content
sudo chmod -R g+w /opt/bitnami/apps/wordpress/htdocs/wp-content
https://docs.bitnami.com/google/apps/wordpress/
i want to set up my raspberry pi as music stream server.
My music is stored on mounted HDD at /media/external/Music and is sorted in subdirectories:
directory1
directory2
directory3
mp3_1
mp3_2
mp3_3
...
Now i want all music from all sub directories and the mp3 files in Music directory itself.
I have added the directory stream/music as location for symlinks to my music.
I have read on mpd.wikia.com, that it is possible to use symlinks.
But if i do it like there shown, it adds the "Music" symlink in my music directory.
So i need symlinks to all files i guess - how to solve this automatically? (I need symlinks to all mp3 files in "Music" and its subdirectories)
At my raspberry a debian6 is running (wheezy)
Thanks in advance
a simple way to create symlinks for all files in a directory would be to use find:
find /path/to/music -type f -exec ln -s \{\} . \;
note however that this will give you errors if multiple files have the same name
ln: failed to create symbolic link ‘./Its_a_shame.mp3’: File exists