I'm using the Ironwood Open Edx version and I don't see any buttons to delete a course
How to delete a course in Open EDX?
Are there any scripts or something similar to delete the course?
go to edx-platform directory:
cd /edx/app/edxapp/edx-platform
run this command and get all of your course ids:
sudo -u www-data /edx/bin/python.edxapp /edx/bin/manage.edxapp lms dump_course_ids --settings production
remove course, based on their id by this command:
sudo -u www-data /edx/bin/python.edxapp /edx/bin/manage.edxapp cms delete_course COURSE_ID --settings production
Related
I am trying to use Ngrok to create an introspected tunnel to localhost webhook development tool on my Linux subsystem (Powershell --> bash)
I try to install ngrok using the following:
sudo apt install ngrok-client
From what I understand the sudo command used installs ngrok v 1.6.
When I attempt to execute ngrok 80 I get an error:
Invalid address server_addr 'ngrokd.ngrok.com:443'
I searched for this in another post and was informed that ngrok v. 1.6 is obsolete and in order to continue using ngrok would be to upgrade to 2.0
Testing PayPal with Rails
It's advised to download from the website http://ngrok.com, which is simple enough, but what is the correct way to download for linux subsystem use? Should I download for Linux and unzip? Or am I suppose to download for Windows?
Let me know if I'm misunderstanding anything
I use ubuntu since years, I trust the online instructions so either do:
sudo apt-get update
sudo apt-get install ngrok-client
or try to use this instruction and let me know if you have problems
the same instructions are included hear
$ unzip /path/to/ngrok.zip
$ is just the sign from your terminal. You do not need to input $, but you need to open the terminal (ctrl+alt+t), run the unzip command to unzip the folder.
You will find the folder under your downloads. So / is the root of your machine. You need to go inside your home folder which will be /home so you do cd (change directory) followed by that path
cd /home
then you do ls to list all the directories. You should see your profile with your name username. You should be able to get in the download folder with cd <username>/Downloads where <username> should be replaced with your personal folder name
At this point you are inside the Downloads directory. You can do an ls in your terminal, find the name of the file you downloaded (should be something like ngrok-stable-linux-amd64.zip) and run
unzip <file-name.zip>
where file name is the file you downloaded (something like ngrok-stable-linux-amd64.zip) or you can go back to the root directory and run
cd /
unzip /home/<username>/Downloads/<yourfile.zip>
Read the documentation on how to use ngrok. Try it out by running it from the command line:
./ngrok help
Also I read from the documentation, that you can set up that address
There is some discussion online about this
Testing PayPal with Rails
I can help you more but I need your feedback
You can try this from the official docs.
sudo tar xvzf ~/Downloads/ngrok-v3-stable-linux-amd64.tgz -C /usr/local/bin
I'm trying out MGT Development Environment 7.0 and installed a fresh copy of Magento 2.
every time after php bin/magento setup:upgrade, and reload the page, generated files in var, pub, generated have different user and group clp:clp.
Instead of running chmod -R 777 . every time. Can anyone suggest a better solution?
Thank in advance.
After view phpinfo(), found out that php in running by user clp
Simply chown the webroot clp:clp and everytime run php command by sudo -u clp php yourCommand, which solve the problem.
I am trying to install ruby gems on my computer running Ubuntu 16.04. I use bash with the oh-my-zsh framework.
When I run the command:
curl -L https://get.rvm.io | bash -s stable --ruby
I get the error message:
mktemp: failed to create file via template '/usr/share/rvm/rvm-exec-test.XXXXXX': Permission denied
How do I set up the permissions for this to work properly?
You can use:
curl -L https://get.rvm.io | sudo bash -s stable --ruby
NOTE: Running a script as sudo can be very dangerous if you don't know what it is actually doing. Make sure to check the script and if possible give the appropriate permissions to the required files and or folders it needs to access. For some more info regarding why it can be dangerous see https://elementaryos.stackexchange.com/questions/448/why-is-running-commands-with-sudo-dangerous
Quick example with your particular use case, as can be seen in the link:
"...If a website is asking you to curl http://link/to/script | sudo bash, don't do that. Download the script, take a quick look, and after that, you can run it. Even if the original author did not intend to make the script malicious, someone might have compromised the original author's accounts and uploaded a new, "updated" script. You are the one responsible for your computer's integrity, and therefore you need to be familiar with your system's capabilities."
Make The directory as read and write ... cd dirname chmod 777
or
sudo gem install 'gem name','version'
I have a server that can only SSH using a non-admin username. I also have the root username and password for this server. I want to install some packages by bootstrapping this node. Is there a way to bootstrap this server and run the installations switching to root?
I ran the command,
knife bootstrap [NODE_IP] --ssh-user [NON-ROOT-USERNAME] --ssh-password [NON-ROOT-PASSWORD] --sudo --use-sudo-password --node-name [NODE_NAME] --run-list 'recipe[bootstrap_test]'
You would need user with sudo access to install packages which is different from running installations using root. Give the non-admin user sudo access in sudoers file. you can configure sudo access using command visudo.
Also see this thread
Short question: my system user (name sharelatex) does not search in manually installed TexLive in /usr/local/texlive but search in /usr/share/texlive (I don't know why there is this folder here, I didn't install TexLive from Ubuntu repo). My another normal user and root user can search well in /usr/local/texlive. How can I force sharelatex user to search in /usr/local/texlive? Thanks!
Detail: I'm trying to install sharelatex onto my Ubuntu server.
I have manually installed TexLive using:
wget http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz
tar -xvf install-tl-unx.tar.gz
cd install-tl-*
sudo ./install-tl
While installing, I have created a system user named sharelatex and added it to group sharelatex by these 2 commands:
sudo adduser --system --home /var/www/sharelatex --no-create-home --group sharelatex
sudo chown -R sharelatex:sharelatex /var/www/sharelatex
When I login as root or normal user, the output of the command
which latex
is
/usr/local/texlive/2015/bin/x86_64-linux/latex
However,when I try to run the same command as sharelatex user:
sudo -u sharelatex which latex
the output is
/usr/bin/latex
I also think this was the problem about $PATH with system user sharelatex. Even I have tried to put my TexLive directory to /etc/environment, my sharelatex user still cannot find it. However, after take a closer look at sharelatex service files, I see that the path for sharelatex seems to be set again when sharelatex execute latex command. Here is how to fix it:
Step 1. Search for your upstart files sharelatex-SERVICE.conf where SERVICE should be replaced with web, chat,clsi,... Full list as below:
sharelatex-chat.conf
sharelatex-clsi.conf
sharelatex-docstore.conf
sharelatex-document-updater.conf
sharelatex-filestore.conf
sharelatex-real-time.conf
sharelatex-spelling.conf
sharelatex-tags.conf
sharelatex-template.conf
sharelatex-track-changes.conf
sharelatex-web.conf
If you follow the installation manual from sharelatex github, these files are probably in /etc/init.
Step 2. In each file, you will see this line:
LATEX_PATH=/usr/local/texlive/2015/bin/x86_64-linux
This line will set LATEX_PATH variable to the right TexLive. And in the ending of the file, you will see the line that will execute TexLive command:
exec sudo -u $USER -g $GROUP env SHARELATEX_CONFIG=$SHARELATEX_CONFIG NODE_ENV=production PATH=$PATH:$LATEX_PATH $NODE app.js >> /var/log/sharelatex/$SERVICE.log 2>&1
What you need to do it to swap $PATH:$LATEX_PATH to become PATH=$LATEX_PATH:$PATH. By doing this, the directory to the right TexLive will be search first.
Make this change to all the sharelatex-SERVICE.conf listed above.
After editing all those files, you might want to restart all those services (search for restart upstart services), or maybe just restart the machine.