Linux

· Linux/Cloud
- omv버전 : openmediavault 5.6.23-1 - 문제점 SMB만 사용하던 OMV에 FTP서비스를 올리고 SMB를 사용하던 계정으로 접근을 시도했지만, 공유폴더가 보이지 않는 현상이 발생 - 해결 FTP서비스가 비활성화 일때 만들어진 계정으로 공유폴더에 접근이 되지 않습니다. FTP서비스 활성화후 기존계정을 삭제 및 생성을 다시 하시면 됩니다. 또는 새로운 계정으로 접속하면 가능합니다.
· Linux/Cloud
- omv버전 : openmediavault 5.6.23-1 -문제점 FTP anonymous계정접근시 읽기는 가능하나 쓰기는 불가한현상 운용할일은 없지만 문제점은 파악 -해결방법 ProFTP설정파일에 anonymous 쓰기권한을 Deny -> Allow로 설정하면 anonymous계정으로도 업로드 및 삭제가 가능합니다. 아래는 설정하는 방법입니다. 1. omv 관리페이지 접근후 접근 권한 관리 -> 공유폴더 -> FTP사용할 폴더 선택 -> 접근 제어 목록 클릭 2. 기타 -> 읽기/쓰기 설정후 저장 (rwxrwxrw-) 리눅스 디렉토리 권한설정 3. 서비스 -> FTP -> 익명FTP 활성 -> 저장 4. FTP -> 공유 -> 추가 5. 공유폴더 선택후 저장 6. FTP 접속 업로드 테스트 (업로드..
· Linux/Python
#!/usr/bin/env python import sys, os, time, atexit from signal import SIGTERM class Daemon: """ A generic daemon class. Usage: subclass the Daemon class and override the run() method """ def __init__(self, pidfile, stdin='/dev/null', stdout='/dev/null', stderr='/dev/null'): self.stdin = stdin self.stdout = stdout self.stderr = stderr self.pidfile = pidfile def daemonize(self): """ do the UNIX do..
· Linux/Python
# https://stackoverflow.com/questions/48506824/automatic-start-and-stop-of-apscheduler-during-boot-of-linux import signal import atexit import os import time PID_FILE_PATH = "pythonPID.pid" stop = False def create_pid_file(): # this creates a file called program.pid with open(PID_FILE_PATH, "w") as fhandler: # and stores the PID in it fhandler.write(str(os.getpid())) def sigint_handler(signum, f..
· Linux/Python
vscode Python에서 argument가 있는 파일 디버그방법 import argparse if __name__=='__main__': parser = argparse.ArgumentParser() parser.add_argument("--log", help="log filename", default=None) args = parser.parse_args() print(args.log) { // IntelliSense를 사용하여 가능한 특성에 대해 알아보세요. // 기존 특성에 대한 설명을 보려면 가리킵니다. // 자세한 내용을 보려면 https://go.microsoft.com/fwlink/?linkid=830387을(를) 방문하세요. "version": "0.2.0", "configuration..
· Linux/Python
증상 root에서는 실행가능, 사용자에서는 퍼미션에러 cd /home/사용자명 ; /usr/bin/env /bin/python3 /home/사용자명/.vscode-server/extensions/ms-python.python-2021.10.1365161279/pythonFiles/lib/python/debugpy/launcher 37148 -- /home/사용자명/TestSample/test.py Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/ping3/__init__.py", line 276, in ping sock = socket.socket(socket.AF_INET, socket.SOCK_RAW, so..