How to Remove Python Files from Python in Windows

Generate a file named that failed when run:
AttribuTeError: Module & # 39; Code & # 39; has no attribute & # 39; InteractiveInterpreter & # 39; Search in Google I've found that the file can not be called code because it's a command or a Python function. You recommend changing the name and removing the Pyc file. I can not find a way to get rid of them Since I do not know where you are and therefore I do not have the option to do so, you can indicate the steps, thank you.

centos – How do I change the permissions of files uploaded by Apache with PHP in / tmp /?

We run a Moodle website (PHP). When files are uploaded, they are put in / tmp / by default, with a name structure like phpxxxxxx and the following file permissions:

-rw ——-. 1 Apache Apache

How do I change this to 644?

I customized the httpd service in / etc / systemd / system with a .conf file that defines:


PrivateTmp = false

UMask = 022

Running systemctl show httpd returns a line:
UMask = 0022

However, files are still uploaded only to Apache users with read / write access. I can not see where I am wrong. Any help would be appreciated.

Probot & Express – Providing static files from a specific route

In the following way I can not deploy these static files (pictures) in the / src / templates / images Directory.

const routerImages = app.route (& # 39; / assets / ti & # 39;);
routerImages.use (requires (& # 39; express & # 39;). static (__ dirname + & # 39; / src / templates / images & # 39;));

Note that app In this case, the application object is probot (GitHub Apps Framework).

I've seen similar questions, but somehow I can not get that to work.

It works on localhost (local dev env). So I'm pretty sure the problem lies in the static directory reference (__dirname …).

Hardening – RHEL7 SSGv0.1 2.2.3 Unauthorized SUID / GUID executable files

We are upgrading to RHEL 7.6. My Nessus scanner gives the following message:
2.2.3.c-d Verification Required: Locate unauthorized SUID / GUID system executables
RHEL7 SSGv0.1 2.2.3 Unauthorized SUID / GUID programs
/ usr / bin / pkexec
/ usr / bin / screen
/ usr / lib / polkit-1 / polkit-agent-helper-1
/ usr / libexec / dbus-1 / dbus-daemon-launch-helper
/ usr / libexec / sssd / krb5_child
/ usr / libexec / sssd / ldap_child
/ usr / libexec / sssd / selinux_child
/ usr / libexec / sssd / proxy_child

My question is, how do I know if these files should have their sticky bits set?

What are common Github information files?

As @Dan Wilson mentioned in the comments, is a great work in it, on the purpose of each one of them to deal with These (and some other) common files in Git Repos. For the sake of completeness, I recommend that you read the README file for this repos

Note These files are typically created in either markdown or plain text format. Sometimes, however, they are also in orgmode (mainly in Emacs projects), in restructured text (mainly in Python projects), etc.

To summarize the repo of kmindi: The most common metadata files in a git repo are:


Summary of other works, their licenses or sources


Files that list who the authors / owners or contributors to the project are / were


Lists the changes that occur between versions / releases


The Code of Conduct for the project. Not very common until recently, but more common nowadays


Guidelines for adding / changing the code base


Information about hacking with the project. Uses etc. This is especially the case for more individual or smaller projects


Legal information on the licensing of the project


This file you should look at provides the best overview of the project


Information about running the tests for the project.

ajax – wp_handle_upload no error, but does not work for large files

wp_handle_upload does not raise an error, but when I look in the folder, the file I wanted to upload is not there. This only happens for large files ~ 7 MB, but smaller ones work fine. I host locally on xampp and made sure that the maximum file size of my php.ini is set to 9 MB and the maximum mail size to 10 MB.

Note that this is done in an AJAX callback function, but I do not know if that will change anything

What do I miss?

Function file_upload_callback () {
$ uploadInfo = wp_handle_upload ($ _ FILES['file']Array (
& # 39; # 39 & test_form; => false,
& # 39; # 39 & mimes; => $ allowedMimes,

if ($ uploadInfo &&! isset ($ uploadInfo['error'] )) {
$ data['message'] , = "File is valid and uploaded successfully.  N";
otherwise {
$ data['message'] , = $ uploadInfo['error'];
wp_die (json_encode ($ data));

To edit files from your Linux VPS terminal

Text files must be constantly read, edited and changed on every VPS, usually after the installation of new packages. Learning to practice and learn with command line text editors can make a big difference in your experience and results with VPS.

If you have problems with your server, the only resource is the system console. You can only use them via a text editor. The only editor guaranteed to exist anywhere is Vi or his descendant Vim. In this tutorial we will learn Nano and Vim, two popular text editors that you can run from a VPS terminal.

Vi Editor

A problem for most VPS newbies is that viThe only text editor that comes standard in any Linux distribution is neither WYSISWYG nor intuitive. If you expect commands from Windows Notepad or MacOS TextEdit to run, you'll get frustrated and disappointed in no time. For example, suppose you follow a script to install a widely used program like Nginx, and it contains a command like

sudo vim /etc/nginx/nginx.conf

If this is your first contact with vi, you will discover that

A) You can not enter in the editor (unless you press at random I on the keyboard) and that

B) You have no idea how to save the file and leave the editor (until you find out) : wq will do the trick).

Vim editor

Over time, an improvement in the vi called vimbecame very popular with power users. It's an almost strict superset of vi But with dozens of extra features, you can automate logs, plug-ins, tasks, work with multiple files simultaneously, using the internal language VimScript, or more formal Python, Ruby, Perl, or Tcl as scripting languages.

Vim It's hard to learn completely, but it's well worth the effort.

Nano Editor

Problems that novices have with Vi / Vim is why another editor, Nanois so popular. The available commands are displayed as a menu on the screen, and when you start typing, text is filled out. No wonder many users have installed a "droplet", an "instance" or a "server" first, their VPS boxes will be installed Nano,

What we will treat

For Nano and Vi / Vim we will show how to:

  • Install the editor under Debian / Ubuntu and Centos
  • Explain the philosophical approach to editing
  • Get help
  • Create a new one or open an existing file
  • Display important commands in the editor
  • Save file and exit


  • Debian / Ubuntu or Centos systems
  • SSH capability in the server
  • Since Vim is a superset of Vi, we will focus only on Vim

Installing the editors on Ubuntu 16.04 and Debian 9

vi should be present on all servers, but some can actually get fetched Vim, We will show installation commands on all systems as there may be differences between hosting providers and server versions.

Update and update the current version of Ubuntu / Debian first:

sudo apt update
sudo apt upgrade

Depending on the Debian version, the sudo Command may not be detected immediately after installing the server. If this is the case, just leave it out sudo from the commands.

Only on Ubuntu when you receive the following prompt:

Just hit the tab key on the keyboard and then press Enter.

You can then install updates if necessary:

sudo apt dist-upgrade 

Then install Nano:

sudo apt install nano

We see that it is already installed on Ubuntu 16.04:

Let's install Vim now:

sudo apt install vim

It is also preinstalled.

Installing editors in Centos 7

The commands are:

sudo yum update
sudo yum install nano
sudo yum install vim

To start the editor

To start an editor, call it at the command prompt with its name. If you add a file name, two things can happen. If there is no file at this address, the editor creates an empty file. If the file exists, it will be opened in the editor.


When is Nano used?

This is the ideal case for using Nano: they are (fairly) new to VPS servers, but have only purchased one to run a particular program on one or more sites. So you browse around and find a good recipe for installing the software you want. You follow the example and reach a point where a configuration file needs to be changed. Nano is an ideal editor for those small, fast, and dirty jobs where you add one or two lines, such as changing the site name for Nginx, and so on, and then save and close the file.

Now switch to a neutral folder like / tmp and open a file called sometext.txt in it:

cd / tmp
nano sometext.txt

We can immediately start typing new text or paste existing text into the clipboard. If Windows is a terminal window (for example, Kitty or Putty), insert text with a right mouse click. Under MacOS, a simple Cmd-V should work.

I have copied the above paragraph and I have the following:

The text is all in it, but you only see the end. Nano does not break text by default, as this is the expected behavior when editing configuration files. Press to switch to broken text Esc, release it and then press $:

That was soft wrapping, hard wraps are turned on or off Esc + L,

The normal way to issue commands in nano is the Ctrl key plus a letter called as ^ G – that is, press Ctrl and then press the pres button G Hold down the Ctrl key. In the menus nano uses capital letters G So you have to press the shift key and then probably G In fact, you do not have to press the Shift key at all.

Instead of Esc followed by a key press, you can also use the key Old with a simultaneous keystroke. So hard winding would mean pressing OldHold down the button and then press shiftHold down the button and then press l, In general, Old and Esc are called Metaschl├╝ssel and – depending on your keyboard – another key can be assigned this role.

Help screen in Nano

Ctrl-G gives you the most important nano-help text on the screen:

Scroll down with combinations of ^ Y and ^ V or, if on a regular PC / Mac keyboard, just use PageUp and Page down Key. You can also scroll up and down using the cursor keys.

We will now examine keyboard shortcuts in more detail:

Commands starting with M, for example M- (Call up the meta-key, which, as we have already seen, can be Esc. Old or something else. So you can jump to the beginning of the paragraph by pressing Esc, release the pressure and then press shift and 9 at the same time. Or you can press Old, Press and hold shiftHold down both buttons and then press 9,

Press Ctrl-X to exit the help screen.

Save file With nano

Use to save files with nano Ctrl-O, The menu below changes to:

To save the file with the changes, just press Enter,

Press Ctrl-X leaves nano if the file is saved; If not, a confirmation will be requested Y.,

In the main menu we see that Ctrl-W will find text, _Ctrl-_ is for the replacement operation and so on.

Vim editor

Learn Vim with Vimtutor

The best way to learn Vim is to start a special version of Vim called vimtutor:


You are immediately in Vim and in "normal" mode. This means that when you press keys on the keyboard no text is entered, but interpreted as interactive commands. To move the cursor, press the buttons H. j. k, and l, Press jFor example, moves the cursor one line below it. Continue to press j until you see the second screen in vimtutor:

and then continue learning from there.

Run Vim

Run the following command


and you get this window:

With Vim you can easily create or open a file:

vim anothertext.txt

Three operating modes in Vim

Vim has several modes, but these three are the most important:

  • NORMAL MODE – cursor, moving through text, text buffer, text manipulation, etc.
  • INSERT MODE – insert text: tap and edit.
  • VISUAL MODE – mode in which larger blocks of text can be defined, cut, pasted, etc.

Press Esc twice to return to normal mode.


If you want to enter text, press I in normal mode to ignite it Insert Mode. You will see the word – INSERT – You can enter text in the lower left corner of the window.

In insert mode, I copied the above paragraph and right-clicked – the text appeared in the Vim editor.

The command mode in Vim

You enter commands by typing a colon. For example, enter : H For help, the following help screen is displayed:

kind : q to return to the screen with text.

Type the following to exit the file and exit the editor:

: x[return]

To stop vim without saving the file, type:

: q![return]

Here are the basic commands:

  • save up: : w
  • save and close: : wq
  • Exit: : q
  • Makes: ! (Example : w! : q!)
  • Copy: y
  • copy a line: yy
  • Insert: p
  • Cut: d
  • to cut a line: dd

If you enter a number before the command, this command will be executed so many times. That is, if w is a command to move the cursor to the beginning of the next word, 15w Moves the cursor 15 words to the right.


Tap V In normal mode, the visual mode is activated.

Note the label VISUAL LINE in the lower left corner of the terminal window.

In this mode you press keys like j and k Moves the cursor up and down, but also marks a white text block. We pressed there V, whole lines with cursor are marked. Press v In this case, only the word is displayed in the lower left corner VISUAL,

Now press to delete text d (Delete) and press y (tear) to copy the marked area. Then move the cursor to the desired insertion position. to press p will then paste after the cursor while P will insert before.

Press c to change text … and to get more commands, you should spend more time learning Vim than you expected!

What can you do next?

We showed the basic editing features of two near-universal text editors, Nano and Vi or Vim. They may not be your cup of tea, but you should at least learn enough about Vi / Vim to read, edit, and then save a file. Other famous editors we can not live up to here are Emacs, Micro, NE, and there are many others to choose from for your VPS!

Dusko Savic is a technical writer and programmer.

Delete log files and spend time with tail -f

I've always wondered if most administrators use "tail -f" log files by default, or only do so when it comes to troubleshooting.

I understand that it gets difficult to deal with a very busy site. I have not been using Webalizer or MRTG for statistics for some time, as I'm used to getting real-time IP addresses, requested resources, and status codes from web servers.

How often do you have to delete your log files? In particular Apache or Squid log files (if you use them).

Back up or mirror files on a Windows Server 2016 to a different drive

Back up or mirror files on a Windows Server 2016 to another drive | Web Hosting Talk

& # 39);
var sidebar_align = & right; & # 39 ;;
var content_container_margin = parseInt (& # 39; 350px & # 39;);
var sidebar_width = parseInt (& # 39; 330px & # 39;);
// ->

  1. Back up or mirror files on a Windows Server 2016 to a different drive

    What is the best way to mirror or back up files on a secondary hard disk of a Windows Server 2016 system? I want to manage duplicate files from a specific folder synchronously on a different drive. How would I do that on a Windows machine?

Similar topics

  1. Reply: 11

    Last contribution: 21/05/2010, 16:05

  2. Reply: 5

    Last contribution: 16/08/2007, 10:55

  3. Reply: 0

    Last contribution: 05-04-2007, 03:51 clock

  4. Reply: 2

    Last contribution: 02-12-2005, 20:59 clock

  5. Reply: 1

    Last contribution: 09-05-2004, 10:05

Publish permissions

  • you not allowed post new topics
  • you not allowed Post answers
  • you not allowed Post attachments
  • you not allowed Edit your posts

DreamProxies - Cheapest USA Elite Private Proxies 100 Private Proxies 200 Private Proxies 400 Private Proxies 1000 Private Proxies 2000 Private Proxies - Buy Cheap Private Proxies Buy 50 Private Proxies Buy 100 Private Proxies Buy 200 Private Proxies Buy 500 Private Proxies Buy 1000 Private Proxies Buy 2000 Private Proxies ProxiesLive New Proxy Lists Every Day Proxies123
Proxy Sites Proxy Tunnels Proxy List Working Proxy Sites Hotproxysite Proxy Sites Proxy Sites Anonymous Proxy Anonymous Proxies Proxy Servers Free Proxies Free Proxy List Proxy List Zoxy Proxy List PR liste all proxy sites More Proxies netgofree netgofree Hide-MyIp - The Best Proxy List American Proxy List Web Proxy Submit Proxies Updated Proxy List Updated Proxy List Bypass Proxy Sites Free Proxies List Evolving Critic Business Web Directory Free Proxy List iShortIt MyProxyList Online Proxies Go Proxies Need Proxies PrivateProxies Proxies4MySchool Proxies4Work Free Proxy List Free Proxy Sites ProxyInside Wiksa Proxy Free Proxy List ProxyNoid Proxy List Free Proxy List Proxy Sites Proxy TopList ProxyVille UK Proxy WebProxy List - Listing the best Web Proxies Free Proxy List SchoolProxiesList Stay Anonymous Proxy List The Power Of Ninja Proxy List UNubstruct Free proxy sites Free proxy sites