server.allow-insecure aka rpc-auth-allow-insecure option does not work

用户报告了在GlusterFS 3.4.0 beta3版本中配置允许非特权端口连接的问题,并解决了通过设置选项rpc-auth-allow-insecure为on来启用非安全连接的方法。之后发现无法创建或写入文件,最终确定原因是文件权限不足。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Status: CLOSED NOTABUG
 
 
Component: glusterd (Show other bugs)
Unspecified Unspecified
 
unspecified Severity unspecified
: ---
: ---
Assigned To: krishnan parthasarathi
 
 
:  
 
Blocks:
  Show dependency tree / graph
 
Reported: 2013-06-27 22:08 EDT by Louis Zuckerman
Modified: 2013-06-27 23:04 EDT (History)
1 user (show)
 
Fixed In Version:  
Doc Text:
Environment:
Regression: ---
Documentation: ---
Verified Versions:  
 


Attachments (Terms of Use)

   None ( edit)
Description Louis Zuckerman  2013-06-27 22:08:20 EDT
Description of problem:

I need to allow clients to connect to the volume from insecure (unprivileged) ports >1024.  There appears to be an option in 3.4 to do this: server.allow-insecure.  However when I set this to "ON" or "on" it has no effect, glusterd still refuses to serve clients on unprivileged ports.

Version-Release number of selected component (if applicable):

3.4.0beta3


I'll update this bug with steps to reproduce as soon as I have a good procedure for you.

Thanks!
Comment 1 Louis Zuckerman  2013-06-27 22:30:34 EDT
Shortly after I filed this bug Vijay chatted me on IRC to let me know that in addition to setting server.allow-insecure to on, I also needed to manually add an option to glusterd.vol:

    option rpc-auth-allow-insecure on

I restarted glusterd with the updated volfile and now I can use insecure ports.

Thanks again!
Comment 2 Louis Zuckerman  2013-06-27 22:51:33 EDT
Ok now I have a real bug to report....

After making the change above to glusterd.vol my insecure client program is able to communicate with glusterd to fetch the volfile, however....

When I try to create a file in the volume, nothing happens -- no error, no crash, no file created.

Then when I try to write data into that file, the process crashes and I get a core dump.

To reproduce this problem see the instructions in the readme.md file of the libgfapi-jni project:

https://github.com/semiosis/libgfapi-jni

Those instructions include a "sudo bash" command which will run the test as root.  But DO NOT run it as root to reproduce this problem.  The test succeeds when run as root, but fails when run as an unprivileged user.
Comment 3 Louis Zuckerman  2013-06-27 23:00:36 EDT
Ok I feel dumb.  The insecure client couldn't create or write to the file because the volume permissions didn't allow it.  Once i did a chmod ugo+rwx on the volume, it worked.

PEBKAC
我的django项目,python版本3.8.7,djongo版本4.2.11,启动时要向控制台输入 e: cd WeChat .\WeChat\Scripts\activate cd project python manage.py runserver 0.0.0.0:8000 可以看到我的项目在虚拟环境中,使用了微信自动化库wxauto,以下是导入语句 from django.shortcuts import render from django.views.decorators.http import require_http_methods from django.core import serializers from django.http import JsonResponse import json import spacy from wxauto import * from datetime import datetime, timedelta from .models import lisent,mission from django.db.models import CharField, Value as V, ExpressionWrapper, Func from django.db.models.functions import Concat from django.db.models import F from django.db.models.functions import Substr, StrIndex from django.db.models.expressions import RawSQL from django.utils.timezone import utc from django.utils import timezone from .GroupConcat import GroupConcat import re 以下是一段代码 @require_http_methods([“POST”]) def showgeneralize(request): result={} uid = request.POST.get(‘id’) try: # 检索数据并按 mtype 分组 missions = mission.objects.filter(mresult=0, uid=uid).order_by(‘mtype’) grouped_missions = {} for mission_item in missions: mtype = mission_item.mtype if mtype not in grouped_missions: grouped_missions[mtype] = { ‘clientnames’: [mission_item.clientname], # 初始化并加入当前clientname ‘mquantitys’: [mission_item.mquantity] # 初始化并加入当前mquantity } else: grouped_missions[mtype][‘clientnames’].append(mission_item.clientname) grouped_missions[mtype][‘mquantitys’].append(mission_item.mquantity) # 拼接 clientname 字符串 result_list = [] for mtype, details in grouped_missions.items(): clientnames_str = ', '.join(details[‘clientnames’]) quantitys_str = ', '.join(details[‘mquantitys’]) result_list.append({ ‘mtype’: mtype, ‘clientname’: clientnames_str, ‘mquantity’: quantitys_str }) result[‘list’] = result_list result[‘msg’] = ‘success’ except Exception as e: result[‘msg’] = ‘错误’ result[‘error’] = str(e) return JsonResponse(result) 数据库使用本地MySQL,以下是settings.py from pathlib import Path # Build paths inside the project like this: BASE_DIR / 'subdir'. BASE_DIR = Path(__file__).resolve().parent.parent # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/4.2/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = 'django-insecure-$q7#%afr7m)df6+dlwb&s3y61&t%=-8c9m(gvv4vi@k#-!oya*' # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'api_test', 'login', 'wx', ] MIDDLEWARE = [ 'django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'corsheaders.middleware.CorsMiddleware', 'django.middleware.common.CommonMiddleware', #'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', ] CORS_ORIGIN_ALLOW_ALL = True ROOT_URLCONF = 'project.urls' TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [], 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ 'django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', ], }, }, ] WSGI_APPLICATION = 'project.wsgi.application' DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'wechat', 'USER':'root', 'PASSWORD':'1234', 'HOST':'127.0.0.1', } } AUTH_PASSWORD_VALIDATORS = [ { 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', }, { 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', }, { 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', }, { 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', }, ] LANGUAGE_CODE = 'en-us' TIME_ZONE = 'UTC' USE_I18N = True USE_TZ = True STATIC_URL = 'static/' DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' 以下是models.py内容 from django.db import models # Create your models here. # 监听表 class lisent(models.Model): lesientname=models.CharField(max_length=20) uid=models.IntegerField() # 事务表 class mission(models.Model): id = models.AutoField(primary_key=True) missiontalk=models.CharField(max_length=200) uid=models.IntegerField() clientname=models.CharField(max_length=20) # # 类型 mtype=models.CharField(max_length=20) # 处理结果: # 0:未处理 # 1:完成任务 # 2:拒绝/未完成 # 3:忽略 mresult=models.PositiveSmallIntegerField() mtime = models.DateTimeField(auto_now_add=True) # 数目 mquantity = models.CharField(max_length=20,null = True) manswer=models.CharField(max_length=200,null = True) 现在要把项目发给其他设备使用,假设其他设备的使用者不会安装任何环境(MySQL和python等),也没有耐心输入网址,只想一键启动,我该如何处理项目,使得客户拿到手后能够直接一键使用
最新发布
07-04
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值